@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;700&family=IBM+Plex+Mono:wght@400;600&display=swap");

:root {
  --ink: #182028;
  --ink-soft: #3e4b59;
  --paper: #f5f0e8;
  --paper-strong: #fffaf4;
  --line: #d4c8b8;
  --teal: #176b74;
  --orange: #d66a47;
  --lime: #6a8246;
  --shadow: rgba(18, 20, 24, 0.11);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 18%, #f8d98f 0%, transparent 38%),
    radial-gradient(circle at 86% 78%, #bde0df 0%, transparent 34%),
    linear-gradient(160deg, #f5efe5 0%, #ece4d7 100%);
  overflow-x: hidden;
}

.bg-shape {
  position: fixed;
  pointer-events: none;
  border-radius: 999px;
  filter: blur(46px);
  opacity: 0.55;
}

.bg-shape-a {
  width: 360px;
  height: 360px;
  top: -120px;
  right: -80px;
  background: #ffd39b;
}

.bg-shape-b {
  width: 320px;
  height: 320px;
  bottom: -130px;
  left: -90px;
  background: #b7d9d3;
}

.shell {
  width: min(980px, calc(100% - 2.5rem));
  margin: 3.2rem auto;
  background: #fffbf5;
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: 0 20px 55px var(--shadow);
  padding: 2.2rem clamp(1.1rem, 2.4vw, 2.4rem) 2.5rem;
}

.hero {
  position: relative;
  margin-bottom: 1.8rem;
}

.eyebrow {
  margin: 0;
  font-family: "IBM Plex Mono", monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.74rem;
  color: var(--teal);
}

h1 {
  margin: 0.45rem 0 0.65rem;
  font-size: clamp(1.55rem, 5vw, 2.65rem);
  line-height: 1.08;
}

.subhead {
  margin: 0;
  color: var(--ink-soft);
  max-width: 62ch;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

h2 {
  margin: 0;
  font-size: clamp(1.05rem, 2.5vw, 1.4rem);
}

.meta {
  margin: 0;
  font-family: "IBM Plex Mono", monospace;
  color: var(--ink-soft);
  font-size: 0.86rem;
}

.project-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 0.95rem;
}

.project-card {
  position: relative;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line);
  background: #fdfcfb;
  border-radius: 18px;
  padding: 0.75rem;
  display: grid;
  grid-template-rows: auto 1fr auto auto auto;
  gap: 0.48rem;
  transform: translateY(12px);
  opacity: 0;
  animation: card-in 480ms ease forwards;
  animation-delay: var(--delay, 0ms);
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.4rem;
}

.visual {
  min-height: 0;
  border-radius: 13px;
  border: 1px solid #d9cfc1;
  background: #fcfbf9;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.favicon {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.index {
  margin: 0;
  font-family: "IBM Plex Mono", monospace;
  color: var(--ink-soft);
  font-size: 0.83rem;
}

.badge {
  margin: 0;
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  border: 1px solid;
}

.badge.published {
  color: var(--teal);
  border-color: #99bec2;
  background: #eaf1f2;
}

.badge.progress {
  color: #8b4a27;
  border-color: #ebb5a3;
  background: #faeeeb;
}

.name {
  margin: 0;
  font-size: 1rem;
  line-height: 1.15;
  min-height: 1.15em;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.desc {
  margin: 0;
  color: #515d6a;
  font-size: 0.83rem;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.actions {
  margin-top: 0;
}

.btn {
  width: 100%;
  border: 1px solid var(--ink);
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-family: "IBM Plex Mono", monospace;
  font-weight: 600;
  font-size: 0.82rem;
  padding: 0.58rem 0.8rem;
  background: var(--ink);
  color: #fff;
  transition: transform 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(24, 32, 40, 0.2);
  background: #111820;
}

.btn.disabled {
  background: #e7e1d8;
  color: #6b7280;
  border-color: #e0d8cd;
  pointer-events: none;
}

code {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.87em;
}

@keyframes card-in {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.x-link {
  position: absolute;
  right: 55px;
  bottom: 0;
  display: inline-flex;
  color: var(--ink-soft);
  transition: color 150ms ease, transform 150ms ease;
}

.x-link:hover,
.x-link:focus-visible {
  color: var(--ink);
  transform: scale(1.1);
}

.x-icon {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

@media (max-width: 620px) {
  .shell {
    margin: 1.5rem auto;
    border-radius: 20px;
    padding-top: 1.45rem;
  }

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