:root {
  --bg: #fbf1de;
  --paper: #fdf6e8;
  --surface: #fffcf3;
  --surface-2: #fbeed2;
  --ink: #3e2f23;
  --ink-muted: #7a6a55;
  --line: #e7d3ab;

  --sunset: #d9622b;
  --marigold: #f2a900;
  --peach: #e8845c;
  --avocado: #7c8f4a;
  --teal: #2f8f89;
  --magenta: #c9436b;
  --violet: #8b5fbf;

  --live: #4f7a3f;
  --progress: #2f7fa3;
  --concept: #8b5fbf;
  --utility: #c9781a;

  --radius: 20px;
  --font-display: "Baloo 2", "Segoe UI", sans-serif;
  --font-body: "Nunito", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    radial-gradient(circle, rgba(62, 47, 35, 0.09) 1.6px, transparent 1.6px);
  background-size: 22px 22px;
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  margin: 0 0 0.5em;
}

a { color: inherit; }

#paw-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.9;
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(8px);
  background: rgba(253, 246, 232, 0.88);
  border-bottom: 3px solid var(--ink);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--ink);
}

.brand-mark {
  display: inline-block;
  font-size: 1.35rem;
  transform: rotate(-10deg);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 1rem;
  font-weight: 600;
}

.site-nav a {
  text-decoration: none;
  color: var(--ink-muted);
  transition: color 0.15s ease;
}

.site-nav a:hover { color: var(--sunset); }

.nav-cta {
  padding: 9px 20px;
  border-radius: 999px;
  background: var(--sunset);
  color: #fff8ee !important;
  font-weight: 700;
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}

.nav-cta:hover {
  color: #fff8ee !important;
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--ink);
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  z-index: 1;
  padding: 88px 0 72px;
  overflow: hidden;
}

.hero-arc {
  position: absolute;
  top: -30px;
  right: -60px;
  width: 420px;
  height: 210px;
  opacity: 0.9;
  z-index: -1;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.82rem;
  color: var(--magenta);
  font-weight: 700;
  margin: 0 0 16px;
}

.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  max-width: 17ch;
  background: linear-gradient(95deg, var(--magenta) 0%, var(--sunset) 28%, var(--marigold) 55%, var(--avocado) 78%, var(--teal) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  max-width: 56ch;
  color: var(--ink-muted);
  font-size: 1.15rem;
}

.hero-actions {
  display: flex;
  gap: 18px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  font-size: 1rem;
  border: 2px solid var(--ink);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 3px 3px 0 var(--ink);
}

.btn-primary {
  background: var(--marigold);
  color: var(--ink);
}

.btn-primary:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--ink);
}

.btn-ghost {
  background: var(--surface);
  color: var(--ink);
}

.btn-ghost:hover {
  background: var(--teal);
  color: #fff8ee;
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--ink);
}

.hero-stats {
  display: flex;
  gap: 44px;
  margin-top: 60px;
  flex-wrap: wrap;
}

.stat {
  display: flex;
  flex-direction: column;
}

.stat-num {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--teal);
}

.stat:nth-child(2) .stat-num { color: var(--sunset); }
.stat:nth-child(3) .stat-num { color: var(--violet); }

.stat-label {
  color: var(--ink-muted);
  font-size: 0.9rem;
  font-weight: 600;
}

/* ---------- projects ---------- */

.projects {
  position: relative;
  z-index: 1;
  padding: 32px 0 96px;
}

.section-title {
  font-size: clamp(1.8rem, 3vw, 2.3rem);
}

.section-sub {
  color: var(--ink-muted);
  margin-top: -8px;
  margin-bottom: 32px;
  font-size: 1.05rem;
}

.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.filter-btn {
  padding: 8px 20px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-btn:hover {
  background: var(--surface-2);
  transform: translate(-1px, -1px);
}

.filter-btn.is-active {
  background: var(--violet);
  color: #fff8ee;
  border-color: var(--ink);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
}

.card {
  position: relative;
  background: var(--surface);
  border: 2.5px solid var(--ink);
  border-radius: var(--radius);
  padding: 26px;
  overflow: hidden;
  box-shadow: 5px 5px 0 var(--card-accent, var(--sunset));
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  transform-style: preserve-3d;
  will-change: transform;
}

.card.is-hidden {
  display: none;
}

.card:hover, .card:focus-within {
  box-shadow: 7px 7px 0 var(--card-accent, var(--sunset));
}

.card[data-status~="live"] { --card-accent: var(--live); }
.card[data-status~="progress"] { --card-accent: var(--progress); }
.card[data-status~="concept"] { --card-accent: var(--concept); }
.card[data-status="utility"] { --card-accent: var(--utility); }

.card-glow {
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: radial-gradient(220px circle at var(--mx, 50%) var(--my, 0%), rgba(242, 169, 0, 0.16), transparent 60%);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.card:hover .card-glow { opacity: 1; }

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.card-icon {
  font-size: 1.5rem;
}

.badge {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1.5px solid currentColor;
}

.badge-live { background: #eaf3e2; color: var(--live); }
.badge-progress { background: #e5f2f8; color: var(--progress); }
.badge-concept { background: #f1e9f9; color: var(--concept); }
.badge-utility { background: #fbeed2; color: var(--utility); }

.card h3 {
  font-size: 1.3rem;
  margin-bottom: 10px;
}

.card p {
  color: var(--ink-muted);
  font-size: 0.96rem;
  margin: 0 0 18px;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.card-tags span {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--ink-muted);
  background: var(--surface-2);
  border: 1.5px solid var(--line);
  padding: 3px 11px;
  border-radius: 999px;
}

.card-link {
  display: inline-block;
  font-weight: 800;
  font-size: 0.95rem;
  text-decoration: none;
  color: var(--sunset);
}

.card-link-muted {
  color: var(--ink-muted);
  font-weight: 600;
}

/* ---------- about ---------- */

.about {
  position: relative;
  z-index: 1;
  padding: 24px 0 96px;
}

.about-inner {
  max-width: 900px;
  background: var(--surface);
  border: 2.5px solid var(--ink);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: 6px 6px 0 var(--marigold);
  display: flex;
  gap: 40px;
  align-items: center;
}

.about-photo {
  flex: 0 0 220px;
  background: #fff;
  padding: 14px 14px 34px;
  border: 1px solid #e5d8bd;
  border-radius: 4px;
  box-shadow: 0 10px 24px rgba(62, 47, 35, 0.18);
  transform: rotate(-4deg);
}

.about-photo img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 2px;
  background: var(--surface-2);
}

.about-photo.no-photo img { visibility: hidden; }

.about-photo.no-photo {
  position: relative;
}

.about-photo.no-photo::after {
  content: "🐾";
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  bottom: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  background: var(--surface-2);
  border-radius: 2px;
}

.about-photo-caption {
  margin: 12px 0 0;
  text-align: center;
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--ink-muted);
  transform: rotate(1deg);
}

.about-text { flex: 1; min-width: 0; }

.about p {
  color: var(--ink-muted);
  font-size: 1.05rem;
}

@media (max-width: 640px) {
  .about-inner {
    flex-direction: column;
    padding: 28px;
  }
  .about-photo { flex-basis: auto; width: 180px; align-self: center; }
}

/* ---------- footer ---------- */

.site-footer {
  position: relative;
  z-index: 1;
  border-top: 3px solid var(--ink);
  padding: 40px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: space-between;
}

.footer-inner > div:first-child {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
}

.footer-email {
  text-decoration: none;
  color: var(--teal);
  font-weight: 700;
}

.footer-note {
  width: 100%;
  color: var(--ink-muted);
  font-size: 0.85rem;
  margin: 0;
}

@media (max-width: 640px) {
  .site-nav { gap: 16px; font-size: 0.85rem; }
  .hero { padding: 56px 0 48px; }
  .hero-stats { gap: 32px; }
  .hero-arc { opacity: 0.5; width: 300px; height: 150px; }
}
