/* purrguy.me — homepage (hero + tools + portfolio), black & white */

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 6%;
}

/* ---------- Hero ---------- */
.hero {
  padding: 70px 0 50px;
  position: relative;
  overflow: hidden;
}

.hero-wrap { max-width: 700px; position: relative; z-index: 2; }

.hero h1 {
  font-size: clamp(38px, 7vw, 64px);
  line-height: 1.05;
  letter-spacing: -1px;
  font-weight: 800;
  margin-bottom: 16px;
}

.glitch { position: relative; display: inline-block; }
.glitch::after {
  content: attr(data-text);
  position: absolute;
  left: -2px;
  top: -2px;
  width: 100%;
  height: 100%;
  background: var(--bg);
  overflow: hidden;
  color: var(--ink);
  opacity: 0.28;
  clip: rect(44px, 450px, 90px, 0);
  animation: glitch-anim 3s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
  0% { clip: rect(33px, 9999px, 12px, 0); }
  5% { clip: rect(68px, 9999px, 81px, 0); }
  10% { clip: rect(12px, 9999px, 5px, 0); }
  15% { clip: rect(88px, 9999px, 77px, 0); }
  20% { clip: rect(5px, 9999px, 64px, 0); }
  100% { clip: rect(74px, 9999px, 10px, 0); }
}

.sub {
  font-size: 17px;
  color: var(--muted);
  max-width: 560px;
  margin-bottom: 26px;
  line-height: 1.65;
}
.sub strong { color: var(--ink); font-weight: 600; }

.cta-row { display: flex; gap: 12px; flex-wrap: wrap; }

.stats {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.stat strong {
  display: block;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 2px;
}
.stat span { font-size: 12px; color: var(--muted); }

/* the floating blob — desktop only, it gets in the way on phones */
.hero-doodle {
  position: absolute;
  right: 8%;
  bottom: 10%;
  width: 220px;
  height: 220px;
  border: 3px solid var(--line);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: #fff;
  box-shadow: var(--shadow);
  animation: float 6s ease-in-out infinite;
  z-index: 1;
  pointer-events: none;
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(2deg); }
}

/* ---------- Sections ---------- */
.section { padding: 50px 0; scroll-margin-top: 84px; }

.section-head { margin-bottom: 30px; }
.section-head h2 {
  font-size: clamp(26px, 5vw, 34px);
  font-weight: 800;
  margin-bottom: 8px;
}
.section-head .sub { margin-bottom: 0; font-size: 15px; }

.head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 26px;
  flex-wrap: wrap;
}
.head h2 { font-size: clamp(26px, 5vw, 34px); font-weight: 800; }
.desc { max-width: 440px; color: var(--muted); font-size: 15px; line-height: 1.6; }

/* ---------- Tools ---------- */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.tool-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: transform 0.2s, border-color 0.2s;
  display: flex;
  flex-direction: column;
}
.tool-card:hover { border-color: var(--ink); transform: translateY(-4px); }

.tool-icon { font-size: 34px; margin-bottom: 14px; display: inline-block; }
.tool-card h3 { font-size: 19px; font-weight: 700; margin-bottom: 10px; }
.tool-card p { color: var(--muted); font-size: 15px; margin-bottom: 18px; flex: 1; }

.btn-link { color: var(--ink); font-weight: 700; font-size: 14px; }
.btn-link:hover { text-decoration: underline; }

/* ---------- Filters ---------- */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }

.filter {
  cursor: pointer;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 16px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.15s;
}
.filter:hover { border-color: var(--line-strong); color: var(--ink); }
.filter.active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- Projects ---------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.project {
  min-height: 200px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.2s, border-color 0.2s;
  text-decoration: none;
}
.project:hover { border-color: var(--ink); transform: translateY(-4px); text-decoration: none; }
.project[hidden] { display: none; }

.ptop {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.glyph {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  background: var(--surface-2);
}
.tag {
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 999px;
  padding: 4px 10px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
}
.project h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; color: var(--ink); }
.project p { font-size: 14px; color: var(--muted); line-height: 1.5; margin-bottom: 18px; flex: 1; }
.pfoot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  margin-top: auto;
}
.url { font-size: 11px; color: var(--muted); font-family: var(--mono); }
.arrow { color: var(--ink); font-size: 14px; transition: transform 0.15s; }
.project:hover .arrow { transform: translateX(3px); }

/* ---------- About ---------- */
.about {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: clamp(30px, 5vw, 46px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  background: var(--surface-2);
}
.about h2 { font-size: clamp(26px, 4vw, 38px); font-weight: 800; }
.about p { color: var(--muted); font-size: 15px; line-height: 1.7; margin-bottom: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chip {
  font-size: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 10px;
  background: #fff;
  color: var(--ink);
}

/* ---------- Communities ---------- */
.communities {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.community {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: all 0.15s;
  text-decoration: none;
}
.community:hover { border-color: var(--ink); transform: translateY(-2px); text-decoration: none; }
.community .glyph { flex: 0 0 38px; width: 38px; height: 38px; font-size: 14px; }
.community strong { display: block; font-size: 13px; font-weight: 700; color: var(--ink); }
.community small { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; }

/* ---------- Notes ---------- */
.notes {
  padding: 50px 0;
  background: var(--surface-2);
  scroll-margin-top: 84px;
}
.note-card {
  background: var(--surface);
  border-left: 4px solid var(--ink);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 22px 26px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.note-card:last-child { margin-bottom: 0; }
.note-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.note-card p { color: var(--muted); font-size: 15px; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .projects-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .communities { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about { grid-template-columns: 1fr; gap: 22px; }
  .head { flex-direction: column; align-items: flex-start; gap: 10px; }
}

@media (max-width: 720px) {
  .hero { padding: 50px 0 40px; }
  .hero-doodle { display: none; }
  .stats { gap: 24px; margin-top: 30px; }
  .stats .stat { flex: 1 1 40%; }
}

@media (max-width: 640px) {
  .projects-grid { grid-template-columns: 1fr; }
  .project { min-height: 0; padding: 20px; }
  .tool-card { padding: 20px; }
  .about { border-radius: 16px; }
  .sub { font-size: 16px; }
}

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