:root {
  color-scheme: light;
  --background: #fafafa;
  --foreground: #09090b;
  --card: #ffffff;
  --muted: #f4f4f5;
  --muted-foreground: #71717a;
  --border: #e4e4e7;
  --input: #e4e4e7;
  --primary: #18181b;
  --primary-foreground: #fafafa;
  --ring: #a1a1aa;
  --blue: #2563eb;
  --amber: #b45309;
  --green: #15803d;
  --rose: #be123c;
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px),
    var(--background);
  background-size: 56px 56px;
  background-position: -1px -1px;
  color: var(--foreground);
  font-family:
    ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

.site-header,
main,
.site-footer {
  width: min(1120px, calc(100% - 32px));
  margin-inline: auto;
}

.site-header {
  display: flex;
  height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand,
.header-actions,
.hero-actions,
.profile,
.mini-stats,
.filter-bar,
.project-meta,
.project-links,
.tag-list,
.site-footer {
  display: flex;
  align-items: center;
}

.brand {
  gap: 9px;
  font-weight: 650;
}

.brand-mark {
  width: 14px;
  height: 14px;
  border: 3px solid var(--foreground);
  border-radius: 999px;
  box-shadow: 10px 0 0 -4px var(--blue), 20px 0 0 -4px var(--amber);
}

.header-actions,
.hero-actions {
  gap: 8px;
}

.button {
  display: inline-flex;
  height: 36px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0 12px;
  background: var(--card);
  font-size: 13px;
  font-weight: 550;
  white-space: nowrap;
}

.button.primary {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--primary-foreground);
}

.button:hover,
.filter:hover {
  background: var(--muted);
}

.button.primary:hover {
  background: #27272a;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  align-items: end;
  padding: 72px 0 28px;
}

.hero-copy {
  max-width: 760px;
}

.caption {
  margin: 0 0 8px;
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 550;
}

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

h1 {
  max-width: 760px;
  margin-bottom: 18px;
  font-size: clamp(2.8rem, 7vw, 5.9rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  line-height: 1.12;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: 18px;
  line-height: 1.2;
}

.lead {
  max-width: 650px;
  margin-bottom: 24px;
  color: var(--muted-foreground);
  font-size: 16px;
}

.hero-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  padding: 16px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.profile {
  gap: 10px;
  padding-bottom: 14px;
}

.profile img {
  display: block;
  border-radius: 999px;
}

.profile-name,
.profile-id,
.panel-note {
  margin: 0;
}

.profile-name {
  font-weight: 650;
}

.profile-id,
.panel-note,
.project-description,
.project-meta,
.site-footer {
  color: var(--muted-foreground);
}

.profile-id {
  font-size: 12px;
}

.mini-stats {
  gap: 1px;
  overflow: hidden;
  margin: 14px 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--border);
}

.mini-stats div {
  flex: 1;
  background: var(--card);
  padding: 12px;
}

.mini-stats strong,
.mini-stats span {
  display: block;
}

.mini-stats strong {
  font-size: 24px;
  line-height: 1;
}

.mini-stats span {
  margin-top: 4px;
  color: var(--muted-foreground);
  font-size: 12px;
}

.panel-note {
  font-size: 13px;
}

.works {
  margin-top: 72px;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.search {
  width: min(300px, 100%);
}

.search input {
  width: 100%;
  height: 38px;
  border: 1px solid var(--input);
  border-radius: 6px;
  background: var(--card);
  color: var(--foreground);
  padding: 0 11px;
}

.filter-bar {
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.filter {
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  color: var(--muted-foreground);
  padding: 0 12px;
  font-size: 13px;
  font-weight: 550;
}

.filter.is-active {
  border-color: var(--foreground);
  background: var(--foreground);
  color: var(--primary-foreground);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.project-card {
  display: flex;
  min-height: 414px;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  padding: 16px;
}

.project-screenshot {
  position: relative;
  display: grid;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  place-items: center;
  margin: 0 0 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px),
    var(--muted);
  background-size: 18px 18px;
}

.project-screenshot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-screenshot span {
  display: none;
  max-width: calc(100% - 24px);
  overflow-wrap: anywhere;
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 650;
  text-align: center;
}

.project-screenshot.is-missing span {
  display: block;
}

.project-card[data-category="tool"] {
  border-top-color: var(--blue);
}

.project-card[data-category="stream"] {
  border-top-color: var(--green);
}

.project-card[data-category="design"] {
  border-top-color: var(--rose);
}

.project-card[data-category="experiment"] {
  border-top-color: var(--amber);
}

.project-meta {
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 18px;
  font-size: 12px;
}

.project-title {
  margin: 0 0 10px;
  overflow-wrap: anywhere;
  font-size: 20px;
  line-height: 1.15;
}

.project-description {
  margin-bottom: 18px;
}

.tag-list {
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}

.tag {
  display: inline-flex;
  height: 24px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  padding: 0 8px;
  font-size: 12px;
  font-weight: 500;
}

.project-links {
  gap: 8px;
  margin-top: 16px;
}

.project-links a {
  flex: 1;
}

.empty-message {
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--card);
  padding: 18px;
  color: var(--muted-foreground);
}

.site-footer {
  justify-content: space-between;
  gap: 16px;
  padding: 32px 0;
  font-size: 13px;
}

.site-footer span:first-child {
  color: var(--foreground);
  font-weight: 650;
}

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

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

@media (max-width: 640px) {
  .site-header,
  main,
  .site-footer {
    width: min(100% - 24px, 1120px);
  }

  .site-header,
  .section-header,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-header {
    height: auto;
    padding: 14px 0;
  }

  .hero {
    padding-top: 42px;
  }

  h1 {
    font-size: 3.2rem;
  }

  .search {
    width: 100%;
  }

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