* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --color-bg: #0f1117;
  --color-surface: #1a1d24;
  --color-text: #ececec;
  --color-muted: #616161;
  --color-soft: #9a9a9a;
  --color-accent: #e643e2;
  --color-border-card: #804b7f;
  --section-margin-x: clamp(1.5rem, 20vw, 48rem);
  --section-margin-y: clamp(4rem, 8vw, 8rem);
  --font-mono: "iA Writer Mono", monospace;
  --root-font-pct: 92%;

  /* Typography scale — see TYPOGRAPHY.md; use vars instead of raw font-size */
  --text-micro: 0.75rem;
  --text-label: 0.8rem;
  --text-feedback: 0.85rem;
  --text-ui: 0.9rem;
  --text-demo-heading: 0.95rem;
  --text-caption: clamp(0.7rem, 1.5vw, 0.85rem);
  --text-nav: clamp(0.98rem, 1.85vw, 1.12rem);
  --text-role: clamp(0.8rem, 1.2vw, 0.9rem);
  --text-body: clamp(0.86rem, 1.55vw, 0.94rem);
  --text-body-accent: clamp(0.9rem, 1.5vw, 0.98rem);
  --text-card: clamp(0.88rem, 1.5vw, 0.98rem);
  --text-accordion: clamp(0.84rem, 1.4vw, 0.92rem);
  --text-accordion-panel: clamp(0.82rem, 1.35vw, 0.9rem);
  --text-subhead: clamp(1rem, 1.85vw, 1.2rem);
  --text-section: clamp(1.22rem, 3.5vw, 1.82rem);
  --text-blog-body: clamp(0.9rem, 1.6vw, 1.02rem);
  --text-blog-title: clamp(1.35rem, 3.5vw, 2rem);
  --text-blog-h2: clamp(1.15rem, 2.3vw, 1.48rem);
  --text-blog-h3: clamp(1.02rem, 1.9vw, 1.15rem);
  --text-blog-lead: clamp(1rem, 1.85vw, 1.12rem);
}

@media (max-width: 768px) {
  :root {
    --text-section: clamp(1.12rem, 3.8vw, 1.45rem);
    --text-body: clamp(0.84rem, 2vw, 0.93rem);
    --text-role: 0.86rem;
    --text-accordion: clamp(0.82rem, 1.85vw, 0.9rem);
    --text-accordion-panel: clamp(0.8rem, 1.75vw, 0.88rem);
    --text-nav: clamp(0.92rem, 1.9vw, 1.05rem);
  }
}

@media (max-width: 480px) {
  :root {
    --text-role: 0.8rem;
    --text-card: 1rem;
    --text-subhead: 1.12rem;
  }
}

@font-face {
  font-family: "iA Writer Mono";
  src: local("iA Writer Mono"), local("iAWriterMonoS");
  font-style: normal;
  font-weight: 100 900;
}

.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;
}

.skip-link {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  background: #0f1117;
  color: #ececec;
  font-size: var(--text-ui);
  text-decoration: none;
  transform: translateY(-100%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
  outline: 2px solid #e643e2;
  outline-offset: 2px;
}

.nav-bar {
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(1rem, 3vw, 1.5rem) clamp(1.5rem, 20vw, 48rem);
  padding-top: clamp(1.5rem, 4vw, 2.5rem);
  font-size: var(--text-nav);
}

.nav-bar__name {
  color: inherit;
  text-decoration: none;
  font-weight: 500;
}

.nav-bar__name:hover {
  color: #ececec;
  text-decoration: underline;
  text-decoration-color: #e643e2;
}

.nav-bar__links {
  display: flex;
  gap: clamp(1.25rem, 3vw, 2.5rem);
}

.nav-bar__link {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: #616161;
}

.nav-bar__link:hover {
  color: #ececec;
  text-decoration-color: #e643e2;
}

::selection {
  background: #e643e2;
  color: #fff;
}

::-moz-selection {
  background: #e643e2;
  color: #fff;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  font-size: var(--root-font-pct);
}

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

html,
body {
  min-height: 100%;
  background: var(--color-bg);
  font-family: var(--font-mono);
  color: var(--color-text);
}

body {
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: #616161;
}

a:hover {
  color: #ececec;
  text-decoration: underline;
  text-decoration-color: #e643e2;
}

a:focus-visible {
  outline: 2px solid #e643e2;
  outline-offset: 2px;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: radial-gradient(
    circle,
    rgba(180, 190, 255, 0.1) 1px,
    transparent 1px
  );
  background-size: 84px 84px;
  pointer-events: none;
  z-index: 0;
}

.hero {
  position: relative;
}

#membrane-wrap {
  position: absolute;
  right: 15%;
  top: 40%;
  transform: translateY(-50%);
  width: max(240px, min(58vw, 58vh, 1400px));
  height: max(240px, min(58vw, 58vh, 1400px));
  cursor: crosshair;
  z-index: 0;
}

.membrane-caption {
  position: absolute;
  bottom: -0.1rem;
  right: 0;
  margin: 0;
  text-align: right;
  font-size: var(--text-caption);
  color: #616161;
  font-weight: 400;
  line-height: 1.4;
  max-width: 40ch;
}

#membrane-canvas {
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1.6s cubic-bezier(0.4, 0, 0.2, 1);
}

#membrane-canvas.ready {
  opacity: 1;
}

.grain-overlay {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.12;
  z-index: 1;
}

.content {
  position: relative;
  z-index: 2;
  padding-top: clamp(3rem, 8vw, 4.5rem);
}

.intro-section {
  padding: clamp(4rem, 10vw, 12rem) clamp(1.5rem, 20vw, 48rem);
  padding-top: clamp(6rem, 14vw, 18rem);
  min-height: 80vh;
}

.intro-title {
  font-weight: 600;
  font-size: var(--text-section);
  line-height: 1.4;
  padding-bottom: clamp(2rem, 6vw, 80px);
  max-width: 52ch;
}

.roles {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  align-items: flex-start;
  font-size: var(--text-role);
  line-height: 1.4;
}

.role-line {
  display: flex;
  gap: 0.65rem;
  letter-spacing: 0.01em;
  color: #616161;
}

.role-line.current {
  color: #ececec;
  display: flex;
  align-items: center;
}

.role-line__spacer {
  width: 12px;
  flex-shrink: 0;
  display: inline-block;
}

.active-dot {
  position: relative;
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.active-dot::before,
.active-dot::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #2dd4bf;
}

.active-dot::after {
  background: transparent;
  border: 1.5px solid #2dd4bf;
  animation: ping 2.4s ease-out infinite;
}

@keyframes ping {
  0% {
    transform: scale(1);
    opacity: 0.75;
  }

  70% {
    transform: scale(2.6);
    opacity: 0;
  }

  100% {
    transform: scale(2.6);
    opacity: 0;
  }
}

.projects-section,
.about-section,
.education-section {
  margin: var(--section-margin-y) var(--section-margin-x);
  font-size: var(--text-body);
}

.experience-section {
  margin: var(--section-margin-y) var(--section-margin-x);
  font-size: var(--text-body);
}

.section-heading {
  display: flex;
  gap: 1rem;
  font-size: var(--text-section);
}

.section-heading span {
  color: var(--color-accent);
}

.projects-section__intro {
  margin: 0.75rem 0 0 0;
  max-width: 42rem;
  color: var(--color-muted);
  font-size: var(--text-body);
  line-height: 1.55;
}

.projects-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.project-card {
  flex: 0 0 calc(50% - 0.75rem);
  min-width: 0;
  padding: 1.25rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border-card);
  border-radius: 8px;
  color: var(--color-text);
}

.project-card__thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  margin-bottom: 1rem;
}

.project-card__thumb:has(> img) {
  position: relative;
  padding: 0;
  overflow: hidden;
}

.project-card__thumb > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
}

.project-card__title {
  margin: 0;
  font-size: var(--text-card);
  font-weight: 500;
  line-height: 1.4;
  color: var(--color-text);
}

a.project-card {
  text-decoration: none;
  color: inherit;
}

a.project-card:hover {
  border-color: var(--color-accent);
  box-shadow: inset 0 0 0 1px var(--color-accent);
}

.education-list {
  margin-top: 1.5rem;
  padding-left: 1.25rem;
  color: var(--color-text);
}

.education-list li {
  margin-bottom: 0.6rem;
  line-height: 1.6;
  font-size: var(--text-accordion);
}

.education-list li:last-child {
  margin-bottom: 0;
}

.about-section__content {
  display: flex;
  gap: 2.5rem;
  align-items: stretch;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.about-section__photo {
  flex-shrink: 0;
  width: clamp(220px, 24vw, 320px);
  height: auto;
  display: block;
  object-fit: cover;
  object-position: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid #804b7f;
  border-radius: 8px;
}

.about-section__text {
  flex: 1;
  min-width: 0;
  color: #ececec;
  line-height: 1.6;
}

.about-section__text p {
  margin: 0 0 1rem 0;
}

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

.exp-jobs {
  margin-top: 2rem;
  padding-top: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(2.75rem, 6vw, 3.75rem);
}

.exp-job {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.exp-job-header {
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  margin: 0 0 0.6rem 0;
  font-size: var(--text-subhead);
  line-height: 1.35;
  color: var(--color-text);
}

.exp-job-header__main {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.75rem;
  min-width: 0;
}

.exp-job-header__company {
  font-weight: 600;
  color: var(--color-text);
}

.exp-job-header__role {
  color: var(--color-soft);
  font-weight: 400;
}

.exp-job-header__dates {
  flex-shrink: 0;
  margin-left: auto;
  color: var(--color-soft);
  font-size: 0.88em;
  font-weight: 400;
  text-align: right;
  white-space: nowrap;
}

.exp-job__intro,
.exp-job__note {
  margin: 0;
  font-size: var(--text-body-accent);
  line-height: 1.5;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.72);
  max-width: min(52rem, 100%);
}

.exp-job__intro {
  margin-bottom: clamp(1.35rem, 3vw, 1.85rem);
}

.exp-job__note {
  margin-top: 1.25rem;
  padding-top: 0.75rem;
  color: rgba(255, 255, 255, 0.62);
}

.exp-job__accordions {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.exp-accordion {
  border: none;
  background: none;
  padding: 0;
  margin: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.exp-job__accordions .exp-accordion:last-child {
  border-bottom: none;
}

.exp-accordion__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: clamp(1.05rem, 2.2vw, 1.35rem) 0;
  border: none;
  background: none;
  color: var(--color-text);
  font-family: inherit;
  font-size: var(--text-accordion);
  font-weight: 400;
  text-align: left;
  cursor: pointer;
  appearance: none;
  margin: 0;
  gap: 1rem;
}

.exp-accordion__trigger:hover {
  color: var(--color-text);
}

.exp-accordion__trigger:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

.exp-accordion__title {
  flex: 1;
  min-width: 0;
  font-size: inherit;
  font-weight: 400;
  line-height: 1.45;
}

.exp-accordion__icon {
  flex-shrink: 0;
  width: 1.65rem;
  height: 1.65rem;
  margin-left: 0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent);
  font-size: 0.95em;
  font-weight: 700;
  line-height: 1;
  transition: border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  border: 1px solid var(--color-accent);
  border-radius: 50%;
}

.exp-accordion__icon::before {
  content: '+';
  font-weight: 700;
}

.exp-accordion.is-open .exp-accordion__icon::before {
  content: '−';
}

.exp-accordion__panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.exp-accordion.is-open .exp-accordion__panel {
  max-height: 40rem;
}

.exp-accordion__body {
  padding: 0 0 clamp(1rem, 2vw, 1.25rem) 0;
  padding-right: 2.25rem;
  color: var(--color-soft);
  font-size: var(--text-accordion-panel);
  line-height: 1.55;
}

.exp-accordion__trigger:hover .exp-accordion__icon {
  box-shadow: 0 0 12px rgba(230, 67, 226, 0.45);
}

.exp-accordion.is-open .exp-accordion__icon {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.site-footer {
  margin: 3rem clamp(1.5rem, 20vw, 48rem) 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: #9a9a9a;
  font-size: var(--text-ui);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

@keyframes wave {
  0%,
  60%,
  100% {
    transform: translateY(0);
  }

  30% {
    transform: translateY(-18px);
  }
}

.site-footer__tagline {
  display: inline-block;
}

.site-footer__wave {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: flex-end;
}

.site-footer__wave-char {
  display: inline-block;
  animation: wave 4s ease-in-out infinite;
}

.site-footer__wave-space {
  display: inline-block;
  width: 0.35em;
  flex-shrink: 0;
}

@media (prefers-reduced-motion: reduce) {
  .site-footer__wave-char {
    animation: none;
    transform: none;
  }
}

.site-footer__links {
  display: flex;
  gap: 1rem;
  margin-top: 0;
  flex-wrap: wrap;
  margin-left: auto;
  justify-content: flex-end;
}

.site-footer__link {
  color: #9a9a9a;
  text-decoration: underline;
  text-decoration-color: #616161;
}

.site-footer__link:hover {
  color: #ececec;
  text-decoration-color: #e643e2;
}

@media (max-width: 1024px) {
  #membrane-wrap {
    left: 50%;
    right: auto;
    transform: translate(-50%, -50%);
  }
}

@media (max-width: 768px) {
  #membrane-wrap {
    display: none;
  }

  .nav-bar {
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: clamp(0.8rem, 3vw, 1.1rem) clamp(1rem, 5vw, 1.5rem);
    padding-top: clamp(1.1rem, 5vw, 1.6rem);
  }

  .nav-bar__links {
    flex-wrap: wrap;
    gap: 0.9rem;
  }

  .projects-section,
  .education-section,
  .about-section {
    margin: clamp(3rem, 6vw, 5rem) clamp(1.1rem, 5vw, 2rem);
  }

  .experience-section {
    margin: clamp(3rem, 6vw, 5rem) clamp(1.1rem, 5vw, 2rem);
  }

  .intro-section {
    padding: clamp(2.6rem, 8vw, 3.6rem) clamp(1rem, 5vw, 1.4rem);
    padding-top: clamp(3rem, 8vw, 4rem);
    min-height: auto;
  }

  .roles {
    gap: 0.35rem;
    width: 100%;
    max-width: 100%;
  }

  .intro-title {
    padding-bottom: clamp(1.2rem, 3.5vw, 1.8rem);
    max-width: 100%;
  }

  .role-line,
  .role-line.current {
    line-height: 1.35;
    gap: 0.45rem;
    letter-spacing: 0;
    flex-wrap: nowrap;
    white-space: nowrap;
    align-items: center;
    max-width: 100%;
    min-width: 0;
  }

  .active-dot {
    width: 10px;
    height: 10px;
  }

  .active-dot::after {
    animation: none;
    opacity: 0.6;
  }

  .project-card {
    flex: 0 0 100%;
    padding: 1rem;
  }

  .projects-grid {
    gap: 1rem;
    margin-top: 1.25rem;
  }

  .project-card__thumb {
    margin-bottom: 0.75rem;
  }

  .section-heading {
    gap: 0.75rem;
  }

  .exp-accordion__trigger {
    padding: clamp(0.95rem, 2.5vw, 1.15rem) 0;
  }

  .exp-accordion__icon {
    margin-left: 0.35rem;
    width: 1.5rem;
    height: 1.5rem;
  }

  .exp-job-header {
    flex-wrap: wrap;
  }

  .exp-job-header__dates {
    width: 100%;
    margin-left: 0;
    text-align: left;
    padding-top: 0.15rem;
  }

  .exp-accordion__body {
    padding-right: 0;
  }

  .about-section__content {
    flex-direction: column;
    gap: 1.5rem;
  }

  .about-section__photo {
    width: 180px;
    height: 180px;
  }
}

@media (max-width: 480px) {
  #membrane-wrap {
    display: none;
  }

  body::before {
    background-size: 56px 56px;
  }

  .nav-bar {
    gap: 0.6rem;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .project-card {
    padding: 0.9rem;
  }

  .role-line,
  .role-line.current {
    gap: 0.35rem;
  }
}

.blog-post {
  margin: 0 auto;
  padding: 2rem clamp(1.5rem, 8vw, 4rem) 4rem;
  max-width: 88ch;
  min-width: min(100%, 320px);
  color: var(--color-text);
  font-size: var(--text-blog-body);
  line-height: 1.65;
}

.blog-post__back {
  display: block;
  text-align: center;
  font-size: var(--text-ui);
  color: var(--color-muted);
  text-decoration: underline;
  text-decoration-color: var(--color-muted);
  margin-bottom: 1.5rem;
}

.blog-post__back:hover {
  color: var(--color-text);
  text-decoration-color: var(--color-accent);
}

.blog-post__title {
  font-family: 'Open Sans', sans-serif;
  font-weight: 700;
  font-size: var(--text-blog-title);
  line-height: 1.35;
  margin: 0 0 0.5rem 0;
  color: var(--color-text);
  text-align: center;
}

.blog-post__meta {
  font-size: var(--text-ui);
  color: var(--color-muted);
  margin: 0 0 2rem 0;
  text-align: center;
}

.blog-post__hero,
.blog-post__figure {
  margin: 0 0 2rem 0;
}

.blog-post__figure {
  margin-top: 2.5rem;
}

.blog-post__callout {
  margin: -0.5rem 0 1.5rem 0;
  padding: 0.85rem 1rem;
  border: 1px solid var(--color-accent);
  border-radius: 6px;
  background: rgba(230, 67, 226, 0.08);
  color: rgba(255, 255, 255, 0.9);
  font-size: var(--text-ui);
  line-height: 1.55;
}

.blog-post__callout-icon {
  color: var(--color-accent);
  margin-right: 0.4rem;
}

.blog-post__hero img,
.blog-post__figure img,
.blog-post__hero video,
.blog-post__figure video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--color-border-card);
}

.blog-post__lead {
  font-size: var(--text-blog-lead);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.92);
  margin: 0 0 2rem 0;
  text-align: left;
}

.blog-post h2 {
  font-size: var(--text-blog-h2);
  font-weight: 700;
  margin: 2.5rem 0 0.75rem 0;
  padding-left: 1rem;
  border-left: 4px solid var(--color-accent);
  color: var(--color-text);
  text-align: left;
}

.blog-post h3 {
  font-size: var(--text-blog-h3);
  font-weight: 600;
  margin: 1.75rem 0 0.5rem 0;
  color: var(--color-text);
  text-align: left;
}

.blog-post p {
  margin: 0 0 1rem 0;
  text-align: left;
}

.blog-post ul,
.blog-post ol {
  margin: 0 0 1.25rem 0;
  padding-left: 1.75rem;
  text-align: left;
}

.blog-post ul {
  list-style-type: disc;
}

.blog-post ol {
  list-style-type: decimal;
}

.blog-post li {
  margin-bottom: 0.6rem;
  padding-left: 0.25rem;
}

.blog-post li:last-child {
  margin-bottom: 0;
}

.blog-post strong {
  color: var(--color-text);
  font-weight: 600;
}

.blog-post code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  padding: 0.2em 0.5em;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  color: var(--color-text);
}

.demo-panel {
  margin: 2rem 0;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
}

.button-demo__heading,
.button-types-demo__heading,
.button-states-demo__heading {
  font-size: var(--text-demo-heading);
  color: var(--color-muted);
  margin: 0 0 1rem 0;
  text-align: left;
}

.button-demo__row,
.button-types-demo__row,
.button-states-demo__row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-bottom: 1rem;
}

.button-demo__item,
.button-types-demo__item,
.button-states-demo__item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: flex-start;
}

.button-demo__control {
  padding: 0.5rem 1rem;
  font-family: inherit;
  font-size: var(--text-ui);
  border-radius: 4px;
  cursor: pointer;
  appearance: none;
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}

/* Real <button> — green (correct action control) */
button.button-demo__control {
  color: #fff;
  background: #15803d;
  border: 1px solid #166534;
}

button.button-demo__control:hover {
  background: #16a34a;
  border-color: #22c55e;
}

button.button-demo__control:focus-visible {
  outline: 2px solid #bbf7d0;
  outline-offset: 2px;
}

/* <a> — black / neutral (navigation, not the same as primary CTA) */
.button-demo__control--link {
  display: inline-block;
  color: #ececec;
  background: #0a0a0a;
  border: 1px solid #404040;
}

.button-demo__control--link:hover {
  background: #171717;
  border-color: #525252;
}

.button-demo__control--link:focus-visible {
  outline: 2px solid #a3a3a3;
  outline-offset: 2px;
}

/* Fake control — red (problematic pattern) */
.button-demo__control--fake {
  cursor: default;
  color: #fecaca;
  background: rgba(197, 48, 48, 0.18);
  border: 1px solid #c53030;
}

.button-demo__control--fake:hover {
  background: rgba(197, 48, 48, 0.28);
  border-color: #e53e3e;
}

.button-demo__control--fake:focus-visible {
  outline: 2px solid #f87171;
  outline-offset: 2px;
}

.button-demo__label,
.button-types-demo__label,
.button-states-demo__label {
  font-size: var(--text-label);
  color: var(--color-muted);
  font-family: var(--font-mono);
}

.button-demo__feedback,
.button-types-demo__feedback {
  font-size: var(--text-feedback);
  color: var(--color-muted);
  margin: 0;
  padding: 0.75rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  min-height: 2.5em;
}

.button-types-demo__btn {
  padding: 0.5rem 1rem;
  font-family: inherit;
  font-size: var(--text-ui);
  border-radius: 4px;
  cursor: pointer;
  appearance: none;
  border: 1px solid transparent;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.button-types-demo__btn--primary:focus-visible {
  outline: 2px solid #bbf7d0;
  outline-offset: 2px;
}

.button-types-demo__btn--secondary:focus-visible {
  outline: 2px solid #d4d4d4;
  outline-offset: 2px;
}

.button-types-demo__btn--tertiary:focus-visible {
  outline: 2px solid #22c55e;
  outline-offset: 2px;
}

.button-types-demo__btn--destructive:focus-visible {
  outline: 2px solid #fecaca;
  outline-offset: 2px;
}

.button-types-demo__btn--primary {
  color: #fff;
  background: #15803d;
  border-color: #166534;
  font-weight: 600;
}

.button-types-demo__btn--primary:hover {
  background: #16a34a;
  border-color: #22c55e;
}

.button-types-demo__btn--secondary {
  color: #ececec;
  background: #0a0a0a;
  border-color: #404040;
}

.button-types-demo__btn--secondary:hover {
  border-color: #737373;
  background: #171717;
}

.button-types-demo__btn--tertiary {
  color: #d4d4d4;
  background: transparent;
  border: none;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  padding-left: 0;
  padding-right: 0;
}

.button-types-demo__btn--tertiary:hover {
  color: #4ade80;
}

.button-types-demo__btn--destructive {
  color: #fff;
  background: #c53030;
  border-color: #c53030;
}

.button-types-demo__btn--destructive:hover {
  background: #e53e3e;
  border-color: #e53e3e;
}

.button-states-demo__btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  font-family: inherit;
  font-size: var(--text-ui);
  color: #fff;
  background: #15803d;
  border: 1px solid #166534;
  border-radius: 4px;
  appearance: none;
  font-weight: 600;
  position: relative;
}

.button-states-demo__btn--hover {
  background: #16a34a;
  border-color: #22c55e;
}

.button-states-demo__btn--focus {
  outline: none;
  box-shadow: 0 0 0 2px #0f1117, 0 0 0 4px #4ade80;
}

.button-states-demo__btn--active {
  transform: scale(0.98);
  background: #14532d;
  border-color: #14532d;
}

.button-states-demo__btn--loading {
  color: transparent;
  user-select: none;
}

.button-states-demo__btn--loading::after {
  content: '';
  position: absolute;
  inset: 0;
  margin: auto;
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: button-states-spin 0.6s linear infinite;
}

@keyframes button-states-spin {
  to { transform: rotate(360deg); }
}

.button-states-demo__btn--disabled {
  opacity: 0.5;
  background: #616161;
  border-color: #616161;
  color: #ececec;
}

.consideration-demo__row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.consideration-demo__row:last-child {
  margin-bottom: 0;
}

.consideration-demo__row--align-end {
  align-items: flex-end;
}

.consideration-demo__row--consistent {
  gap: 0.75rem;
}

.consideration-demo__caption {
  font-size: var(--text-label);
  color: var(--color-muted);
  margin: 0;
  text-align: left;
}

.consideration-demo__caption--above {
  margin-bottom: 0.5rem;
}

.consideration-demo__btn {
  display: inline-block;
  font-family: inherit;
  font-size: var(--text-ui);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  border: 1px solid transparent;
  font-weight: 500;
  transition: background 0.2s, border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.consideration-demo__btn--good-contrast {
  color: #fff;
  background: #15803d;
  border-color: #166534;
}

.consideration-demo__btn--poor-contrast {
  color: #6b6b6b;
  background: #3a3a3a;
  border-color: #616161;
}

.consideration-demo__btn--rounded {
  color: #fff;
  background: #15803d;
  border-color: #166534;
  border-radius: 6px;
}

.consideration-demo__btn--square {
  color: #fff;
  background: #15803d;
  border-color: #166534;
  border-radius: 0;
}

.consideration-demo__btn--pill {
  color: #fff;
  background: #15803d;
  border-color: #166534;
  border-radius: 999px;
}

.consideration-demo__btn--irregular {
  color: #fff;
  background: #15803d;
  border-color: #166534;
  border-radius: 6px 20px 6px 20px;
}

.consideration-demo__btn--small {
  color: #fff;
  background: #15803d;
  border-color: #166534;
  padding: 0.2rem 0.5rem;
  font-size: var(--text-micro);
}

.consideration-demo__btn--touch-target {
  color: #fff;
  background: #15803d;
  border-color: #166534;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
}

.consideration-demo__btn--copy-good {
  color: #fff;
  background: #15803d;
  border-color: #166534;
}

.consideration-demo__btn--copy-bad {
  color: #ececec;
  background: rgba(255, 255, 255, 0.08);
  border-color: #616161;
}

.consideration-demo__btn--clicky {
  color: #fff;
  background: #15803d;
  border-color: #166534;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.consideration-demo__btn--flat {
  color: #616161;
  background: transparent;
  border: 1px solid #333;
}

.consideration-demo__btn--primary {
  color: #fff;
  background: #15803d;
  border-color: #166534;
  font-weight: 600;
}

.consideration-demo__btn--secondary {
  color: #ececec;
  background: #0a0a0a;
  border-color: #404040;
}

.consideration-demo__btn--tertiary {
  color: #d4d4d4;
  background: transparent;
  border: none;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.consideration-demo__btn--mismatch-a {
  color: #fff;
  background: #15803d;
  border-color: #166534;
  border-radius: 0;
}

.consideration-demo__btn--mismatch-b {
  color: #ececec;
  background: #616161;
  border-radius: 999px;
  border: none;
}

.consideration-demo__btn--mismatch-c {
  color: #fff;
  background: transparent;
  border: 2px dashed #22c55e;
  border-radius: 8px;
}

.consideration-demo__btn--delight {
  color: #fff;
  background: #15803d;
  border-color: #166534;
}

.consideration-demo--delight .consideration-demo__btn--delight:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.45);
}

@media (max-width: 768px) {
  .blog-post {
    margin-left: clamp(1.5rem, 6vw, 2rem);
    margin-right: clamp(1.5rem, 6vw, 2rem);
    padding-top: 1.5rem;
  }
}