:root {
  color-scheme: light dark;
  --page-bg: #eff2f2;
  --landing-bg: #e6ebeb;
  --landing-word-color: rgba(15, 23, 42, 0.08);
  --content-bg: #edf1f2;
  --section-accent: #0f766e;
  --section-accent-strong: #115e59;
  --section-border: rgba(51, 65, 85, 0.18);
  --section-panel: rgba(252, 253, 253, 0.9);
  --section-panel-muted: rgba(247, 249, 250, 0.82);
}

@media (prefers-color-scheme: dark) {
  :root {
    --page-bg: #111418;
    --landing-bg: #171c20;
    --landing-word-color: rgba(241, 245, 249, 0.05);
    --content-bg: #13181d;
    --section-accent: #5eead4;
    --section-accent-strong: #99f6e4;
    --section-border: rgba(148, 163, 184, 0.14);
    --section-panel: rgba(13, 18, 24, 0.66);
    --section-panel-muted: rgba(15, 23, 42, 0.42);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--page-bg);
}

a {
  color: inherit;
}

.landing-surface {
  position: relative;
  background: var(--landing-bg);
  isolation: isolate;
  border-bottom: 1px solid rgba(51, 65, 85, 0.08);
}

.landing-word-cloud {
  position: absolute;
  inset: -24%;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

.landing-word-cloud__track {
  position: absolute;
  height: 240%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0;
  width: 225%;
  left: -66%;
  top: -40%;
  transform: rotate(-20deg);
  transform-origin: center;
  color: var(--landing-word-color);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 0.9;
  text-transform: lowercase;
  white-space: nowrap;
  word-spacing: 0.16em;
}

.landing-word-cloud__row {
  display: block;
  transform: translateX(var(--row-offset, 0)) scaleX(var(--row-scale, 1));
  opacity: var(--row-opacity, 0.72);
}

.landing-word-cloud__row:nth-child(3n) {
  font-size: 12px;
}

.landing-word-cloud__row:nth-child(4n) {
  font-size: 14px;
}

.landing-word-cloud__row:nth-child(5n) {
  letter-spacing: 0.025em;
}

.landing-word-cloud__row:nth-child(6n) {
  opacity: 0.6;
}

#hero-content {
  position: relative;
  z-index: 1;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  padding: 0.35rem;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.92);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    0 10px 24px rgba(15, 23, 42, 0.08);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    background-color 180ms ease;
}

.social-link:hover {
  transform: translateY(-2px);
  border-color: rgba(20, 184, 166, 0.34);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 14px 30px rgba(15, 23, 42, 0.12);
}

.social-link:focus-visible {
  outline: 2px solid var(--section-accent);
  outline-offset: 3px;
}

.social-link__icon-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 0.45rem;
  border-radius: 0.78rem;
  background: var(--icon-surface, rgba(241, 245, 249, 0.9));
  box-shadow: var(--icon-frame-shadow, inset 0 1px 0 rgba(255, 255, 255, 0.38));
}

.social-link__icon {
  display: block;
  width: calc(100% * var(--icon-scale, 1));
  height: calc(100% * var(--icon-scale, 1));
  object-fit: contain;
}

.social-link--mastodon {
  --icon-surface: linear-gradient(180deg, #e6f4ff 0%, #cfe9ff 100%);
  --icon-scale: 0.94;
}

.social-link--bluesky {
  --icon-surface: linear-gradient(180deg, #e6f4ff 0%, #cfe9ff 100%);
  --icon-scale: 0.88;
}

.social-link--matrix {
  --icon-surface: linear-gradient(180deg, #e6f4ff 0%, #cfe9ff 100%);
  --icon-scale: 0.84;
}

.social-link--codeberg {
  --icon-surface: linear-gradient(180deg, #e6f4ff 0%, #cfe9ff 100%);
  --icon-scale: 0.92;
}

.social-link--email {
  --icon-surface: linear-gradient(180deg, #fff3de 0%, #ffe4bf 100%);
  --icon-scale: 0.9;
}

.social-link--signal {
  --icon-surface: linear-gradient(180deg, #e6f4ff 0%, #cfe9ff 100%);
  --icon-scale: 0.84;
}

.content-surface {
  min-height: 100svh;
  display: flex;
  align-items: center;
  background: var(--content-bg);
}

.content-surface > div {
  width: 100%;
}

.workbench {
  padding: 2rem;
  border: 1px solid var(--section-border);
  border-radius: 0.8rem;
  background: var(--section-panel-muted);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 12px 30px rgba(15, 23, 42, 0.04);
}

.workbench__intro {
  max-width: 48rem;
  margin-bottom: 1.75rem;
}

.workbench__eyebrow {
  margin: 0;
  color: var(--section-accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.workbench__title {
  margin: 0.55rem 0 0;
  color: #0f172a;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.workbench__lede {
  margin: 1rem 0 0;
  max-width: 42rem;
  color: #334155;
  font-size: 1rem;
  line-height: 1.75;
}

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

.project-card {
  grid-column: span 6;
  padding: 1.5rem;
  border: 1px solid var(--section-border);
  border-radius: 0.65rem;
  background: var(--section-panel);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.project-card--featured {
  grid-column: span 7;
  border-color: rgba(15, 118, 110, 0.34);
}

.project-card--supporting {
  grid-column: span 5;
}

.project-card__kicker {
  margin: 0;
  color: var(--section-accent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.project-card__title {
  margin: 0.7rem 0 0;
  color: #0f172a;
  font-size: 1.45rem;
  line-height: 1.15;
}

.project-card__title a {
  text-decoration: none;
}

.project-card__title a:hover {
  color: var(--section-accent-strong);
}

.project-card__description,
.project-card__detail {
  margin: 0.85rem 0 0;
  color: #334155;
  font-size: 0.98rem;
  line-height: 1.7;
}

@media (prefers-color-scheme: dark) {
  .landing-surface {
    border-bottom-color: rgba(148, 163, 184, 0.08);
  }

  .workbench {
    border-color: var(--section-border);
    background: var(--section-panel-muted);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.03),
      0 20px 45px rgba(2, 6, 23, 0.18);
  }

  .workbench__eyebrow,
  .project-card__kicker {
    color: var(--section-accent);
  }

  .workbench__title,
  .project-card__title {
    color: #f8fafc;
  }

  .workbench__lede,
  .project-card__description,
  .project-card__detail {
    color: #cbd5e1;
  }

  .project-card {
    border-color: var(--section-border);
    background: var(--section-panel);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  }

  .project-card__title a:hover {
    color: var(--section-accent-strong);
  }

  .social-link {
    border-color: rgba(71, 85, 105, 0.46);
    background: rgba(15, 23, 42, 0.76);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.04),
      0 14px 28px rgba(2, 6, 23, 0.22);
  }

  .social-link:hover {
    border-color: rgba(94, 234, 212, 0.28);
    background: rgba(15, 23, 42, 0.92);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.06),
      0 18px 32px rgba(2, 6, 23, 0.28);
  }

  .social-link--bluesky {
    --icon-surface: linear-gradient(180deg, #eff7ff 0%, #d8ecff 100%);
  }

  .social-link--matrix {
    --icon-surface: #ffffff;
  }

  .social-link--codeberg {
    --icon-surface: linear-gradient(180deg, #f5f9ff 0%, #e1ecff 100%);
  }

}

@media (max-width: 900px) {
  .workbench__grid {
    grid-template-columns: 1fr;
  }

  .project-card,
  .project-card--featured,
  .project-card--supporting {
    grid-column: span 1;
  }
}

@media (max-width: 640px) {
  .social-links {
    gap: 0.85rem;
  }

  .social-link {
    width: 3rem;
    height: 3rem;
    padding: 0.3rem;
  }

  .workbench {
    padding: 1.4rem;
    border-radius: 1rem;
  }

  .project-card {
    padding: 1.15rem;
  }
}