:root {
  color-scheme: light;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --background: #f7f9fc;
  --surface: #ffffff;
  --surface-muted: #f8fafc;
  --footer: #e9eef6;
  --text: #172033;
  --muted: #68748a;
  --border: #ccd4e0;
  --border-strong: #aeb9ca;
  --accent: #3568d4;
  --success: #378564;
  --focus: #3568d4;
}

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

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
}

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

a {
  color: inherit;
  text-decoration-thickness: .08em;
  text-underline-offset: .2em;
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 1rem;
  left: 1rem;
  padding: .7rem 1rem;
  background: var(--surface);
  color: var(--text);
  transform: translateY(-180%);
}

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

.site-header {
  width: min(100% - 3rem, 1240px);
  min-height: 78px;
  margin: 0 auto;
  padding: 1rem 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2rem;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
}

.site-header nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: clamp(1rem, 3vw, 2.5rem);
  width: 100%;
}

.site-header nav a {
  font-size: .82rem;
  text-decoration: none;
}

.site-header nav a:hover,
.project-link:hover,
.social-links a:hover {
  color: var(--accent);
}

.library-main {
  width: min(100% - 3rem, 1280px);
  margin: 0 auto;
}

.library-hero {
  min-height: 420px;
  padding: clamp(2.75rem, 5vw, 4rem) 0 clamp(3.5rem, 6vw, 4.75rem);
  display: grid;
  grid-template-columns: 1.9fr minmax(260px, 340px);
  gap: 4rem;
  align-items: center;
}

.library-hero-copy {
  display: flex;
  flex-direction: column;
  align-self: start;
}

.library-hero h1 {
  max-width: 780px;
  margin: 1rem 0 .6rem;
  font-size: clamp(3.8rem, 8vw, 7rem);
  line-height: .92;
  letter-spacing: -.08em;
}

.hero-kicker {
  margin: 1rem 0 0;
  color: var(--accent);
  font: 500 .82rem "IBM Plex Mono", monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.hero-intro,
.hero-context {
  max-width: 640px;
  margin: 0;
  color: var(--muted);
  font-size: 1.1rem;
}

.hero-intro {
  margin-top: 1.4rem;
}

.hero-context {
  margin-top: 1rem;
}

.profile-token {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  align-self: stretch;
}

.profile-token > span,
.profile-token code {
  display: block;
  color: var(--muted);
  font: .78rem "IBM Plex Mono", monospace;
}

.profile-token img {
  width: 100%;
  aspect-ratio: 1;
  margin: 1rem 0;
  border-radius: 6px;
  object-fit: cover;
  filter: saturate(.7);
}

.library-section {
  padding: 7rem 0;
  border-top: 1px solid var(--border-strong);
  scroll-margin-top: 1rem;
}

.library-section > header {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  margin-bottom: 4rem;
}

.section-title {
  display: flex;
  gap: 1.5rem;
  align-items: baseline;
}

.section-title span {
  color: var(--accent);
  font: .8rem "IBM Plex Mono", monospace;
}

.library-section h2 {
  margin: 0;
  font-size: clamp(2.5rem, 4vw, 4rem);
  letter-spacing: -.05em;
}

.library-section > header > p {
  margin: 0;
  color: var(--muted);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.project-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.component-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .75rem 1rem;
  border-bottom: 1px solid #dce2eb;
  color: var(--muted);
  font: .78rem "IBM Plex Mono", monospace;
}

.component-status {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #5ebc93;
}

.project-card > img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.component-body {
  flex: 1;
  padding: 1.5rem;
}

.component-body > span {
  color: var(--muted);
  font-size: .72rem;
  text-transform: uppercase;
}

.component-body h3 {
  margin: .4rem 0;
  font-size: 1.8rem;
}

.component-body p {
  color: var(--muted);
}

.project-link {
  display: inline-block;
  margin-top: .5rem;
  font-weight: 600;
}

.project-note {
  margin-top: .8rem;
  color: var(--muted);
  font: .88rem/1.5 "IBM Plex Mono", monospace;
}

.component-props {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid #dce2eb;
  background: var(--surface-muted);
  font-size: .82rem;
}

.component-props code,
.hero-role {
  color: var(--accent);
  font: 500 .82rem "IBM Plex Mono", monospace;
  letter-spacing: .02em;
}

.hero-role {
  display: block;
  margin: .75rem 0 0;
  text-transform: lowercase;
}

.component-props code {
  white-space: nowrap;
}

.token-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.5rem;
}

.about-copy {
  max-width: 780px;
}

.about-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.8;
}

.capabilities-panel h3 {
  margin: 0 0 1.2rem;
  font-size: 1.2rem;
}

.capability-token {
  min-height: 170px;
  padding: 1.2rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
}

.capability-token code {
  color: var(--muted);
  font-size: .78rem;
}

.capability-token strong {
  margin: auto 0;
  font-size: 1.1rem;
}

.capability-token span {
  color: var(--success);
  font-size: .7rem;
}

.history-list article {
  display: grid;
  grid-template-columns: 100px 1fr 2fr;
  gap: 2rem;
  padding: 1.4rem 0;
  border-top: 1px solid var(--border);
}

.history-list code {
  color: var(--success);
  font: .78rem "IBM Plex Mono", monospace;
}

.history-list h3,
.history-list p {
  margin: 0;
}

.history-list .role,
.history-list article > p {
  color: var(--muted);
}

.site-footer {
  padding: clamp(5rem, 10vw, 9rem) 0 2rem;
  border-top: 1px solid var(--border);
  background: var(--footer);
}

.contact-panel {
  width: min(100% - 3rem, 1280px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}

.site-footer .footer-label {
  display: block;
  color: var(--muted);
  font: 500 .82rem "IBM Plex Mono", monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.footer-email {
  display: block;
  max-width: 100%;
  margin-top: .8rem;
  font-size: clamp(1.8rem, 5vw, 4.5rem);
  line-height: 1;
  overflow-wrap: anywhere;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  margin: 2.25rem 0 0;
}

.site-footer .social-links {
  margin: 3rem 0 0;
}

.site-footer small {
  display: block;
  width: min(100% - 3rem, 1280px);
  margin: 1.75rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(23, 32, 51, .12);
  color: var(--muted);
}

@media (max-width: 950px) {
  .library-hero {
    gap: 3rem;
  }

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

  .token-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .site-header,
  .library-main {
    width: calc(100% - 2rem);
  }

  .site-header {
    min-height: 0;
    gap: .9rem 1.5rem;
  }

  .library-hero {
    min-height: auto;
    padding: 2.5rem 0 3.75rem;
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .library-hero h1 {
    font-size: clamp(3rem, 14vw, 4.8rem);
  }

  .profile-token {
    display: grid;
    grid-template-columns: 84px 1fr;
    grid-template-rows: 1fr 1fr;
    column-gap: 1rem;
    align-items: center;
  }

  .profile-token > span {
    align-self: end;
  }

  .profile-token code {
    align-self: start;
  }

  .profile-token img {
    grid-column: 1;
    grid-row: 1 / -1;
    width: 84px;
    margin: 0;
  }

  .library-section {
    padding: 4rem 0;
  }

  .library-section > header {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .section-title {
    align-items: flex-start;
  }

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

  .component-props {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .history-list article {
    grid-template-columns: 1fr;
    gap: .6rem;
  }

  .contact-panel,
  .site-footer small {
    width: calc(100% - 2rem);
  }
}

@media (max-width: 430px) {
  .profile-token {
    grid-template-columns: 72px 1fr;
  }

  .profile-token img {
    width: 72px;
  }

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

  .section-title {
    gap: 1rem;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}
