:root {
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --blue-50: #eff6ff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --white: #ffffff;
  --radius-card: 1rem;
  --radius-pill: 999px;
  --shadow-card: 0 1px 2px rgba(17, 24, 39, 0.04), 0 8px 20px -8px rgba(17, 24, 39, 0.10);
  --shadow-card-hover: 0 4px 10px rgba(17, 24, 39, 0.06), 0 16px 32px -12px rgba(17, 24, 39, 0.16);
  --max-width: 880px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--gray-50);
  color: var(--gray-900);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
}

/* ---------- Header ---------- */

header.site-header {
  margin-bottom: 3rem;
}

header.site-header h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.6rem;
}

header.site-header p.intro {
  color: var(--gray-600);
  max-width: 60ch;
  margin: 0 0 1.25rem;
  font-size: 1.05rem;
}

.header-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.header-links a {
  color: var(--blue-600);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}

.header-links a:hover,
.header-links a:focus-visible {
  text-decoration: underline;
}

/* Back link on single-project view */

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--gray-600);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
}

.back-link:hover, .back-link:focus-visible {
  color: var(--blue-600);
}

/* ---------- Groups ---------- */

.group {
  margin-bottom: 2.75rem;
}

.group h2 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--gray-800);
  margin: 0 0 1.1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--gray-200);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}

.grid.single {
  grid-template-columns: 1fr;
  max-width: 640px;
}

/* ---------- Card ---------- */

.card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-card);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
  display: flex;
  flex-direction: column;
}

.card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

.card-name {
  margin: 0 0 0.2rem;
  font-size: 1.2rem;
  font-weight: 650;
}

.card-name a {
  color: inherit;
  text-decoration: none;
}

.card-name a:hover,
.card-name a:focus-visible {
  color: var(--blue-600);
}

.card-tagline {
  color: var(--gray-500);
  font-size: 0.85rem;
  margin: 0 0 0.9rem;
}

.card-description {
  color: var(--gray-600);
  font-size: 0.95rem;
  margin: 0 0 1.1rem;
}

/* Store / project links */

.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.15rem;
}

.link-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.42rem 0.9rem;
  border-radius: var(--radius-pill);
  background: var(--blue-50);
  color: var(--blue-700);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
}

.link-pill:hover,
.link-pill:focus-visible {
  background: var(--blue-600);
  color: var(--white);
}

.link-pill.secondary {
  background: var(--gray-100);
  color: var(--gray-800);
}

.link-pill.secondary:hover,
.link-pill.secondary:focus-visible {
  background: var(--gray-800);
  color: var(--white);
}

/* Worked-on list */

.card h3.section-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gray-500);
  margin: 0 0 0.55rem;
}

.worked-on {
  margin: 0 0 1.1rem;
  padding-left: 1.1rem;
  color: var(--gray-800);
  font-size: 0.92rem;
}

.worked-on li {
  margin-bottom: 0.4rem;
}

.worked-on li:last-child {
  margin-bottom: 0;
}

/* Tech stack */

.tech-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.2rem;
}

.tech-chip {
  font-size: 0.78rem;
  color: var(--gray-600);
  background: var(--gray-100);
  padding: 0.28rem 0.6rem;
  border-radius: 0.4rem;
}

/* Engineering notes — progressive disclosure, keeps cards scannable */

details.eng-notes {
  margin-top: 1.1rem;
  border-top: 1px solid var(--gray-200);
  padding-top: 0.9rem;
}

details.eng-notes summary {
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--blue-600);
  list-style: none;
}

details.eng-notes summary::-webkit-details-marker { display: none; }

details.eng-notes summary::before {
  content: "+ ";
}

details.eng-notes[open] summary::before {
  content: "\2212 "; /* minus sign */
}

details.eng-notes p {
  margin: 0.7rem 0 0;
  color: var(--gray-600);
  font-size: 0.9rem;
}

/* ---------- Empty state ---------- */

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--gray-500);
}

/* ---------- Motion & accessibility ---------- */

@media (prefers-reduced-motion: reduce) {
  .card { transition: none; }
  html { scroll-behavior: auto; }
}

a:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--blue-600);
  outline-offset: 2px;
}

@media (max-width: 480px) {
  header.site-header h1 { font-size: 1.6rem; }
  .wrap { padding: 2rem 1.1rem 3.5rem; }
}


header.site-header .role {
  color: var(--blue-600);
  font-weight: 600;
  font-size: 1.05rem;
  margin: 0 0 0.9rem;
}

.section-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0 0 2rem;
}

.section-divider span {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--gray-500);
  white-space: nowrap;
}

.section-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--gray-200);
}

header.site-header h1 {
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-size: 2.1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 0.5rem;
}

/* small accent rule under the name — echoes the "Projects" divider below it */
header.site-header h1::after {
  content: "";
  display: block;
  width: 44px;
  height: 3px;
  background: var(--blue-600);
  border-radius: 2px;
  margin-top: 0.7rem;
}

/* one orchestrated load-in, header only */
header.site-header {
  opacity: 0;
  transform: translateY(6px);
  animation: header-in 0.5s ease-out forwards;
}

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

@media (prefers-reduced-motion: reduce) {
  header.site-header {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

/* If it's targeted by an ID or class, set its display to none */
iframe[src*="netlify"], 
.netlify-badge {
  display: none !important;
}