:root {
  --red: #EF2020;
  --pink: #ff7a7a;
  --black: #000000;
  --white: #ffffff;
  --grey: #f5f5f5;
  --border: #e0e0e0;
  --muted: #555555;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  background: var(--white);
  color: var(--black);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

header {
  background: var(--white);
  border-bottom: 3px solid var(--red);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.site-logo img {
  display: block;
  height: 36px;
  width: auto;
}

.site-title {
  color: var(--black);
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.site-title:hover { color: var(--red); }

.site-link {
  margin-left: auto;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
}

.site-link:hover { color: var(--red); }

main {
  flex: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  width: 100%;
}

h1 {
  margin-bottom: 1.5rem;
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

footer {
  text-align: center;
  padding: 1.5rem;
  font-size: 0.875rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  background: var(--grey);
}

footer a { color: var(--red); }
footer a:hover { color: var(--pink); }

/* Project grid */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.project-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 4px;
  padding: 1.25rem;
  transition: border-color 0.15s, box-shadow 0.15s;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  border-color: var(--red);
  box-shadow: 4px 4px 0 var(--red);
}

.project-card h2 { font-size: 1.1rem; margin-bottom: 0.35rem; font-weight: 700; }
.project-card h2 a { color: var(--black); text-decoration: none; }
.project-card h2 a:hover { color: var(--red); }

.student-name { font-weight: 600; color: var(--red); margin-bottom: 0.4rem; font-size: 0.9rem; }

.tagline { color: var(--muted); font-size: 0.9rem; margin-bottom: 0.5rem; }

.tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
}

.tags li {
  background: var(--black);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.6rem;
  border-radius: 2px;
}

/* Card avatar */
.card-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  margin-bottom: 0.75rem;
  flex-shrink: 0;
}

.card-avatar--empty {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--grey);
  margin-bottom: 0.75rem;
  flex-shrink: 0;
}

.card-body { flex: 1; }

/* Detail page */
.back-link {
  display: inline-block;
  margin-bottom: 1.25rem;
  color: var(--red);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
}

.back-link:hover { color: var(--pink); text-decoration: underline; }

.detail-header {
  display: flex;
  gap: 1.75rem;
  align-items: flex-start;
  margin-bottom: 1.75rem;
}

.detail-headshot {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--red);
  flex-shrink: 0;
}

.detail-meta { flex: 1; }
.detail-meta h1 { margin-bottom: 0.3rem; }
.detail-meta .student-name { margin-bottom: 0.4rem; font-size: 1.2rem; }
.detail-meta .tagline { margin-bottom: 0.75rem; }
.detail-meta p + p { margin-top: 0.35rem; }
.detail-meta a { color: var(--red); }
.detail-meta a:hover { color: var(--pink); }

.description {
  margin-bottom: 1.5rem;
  line-height: 1.7;
  color: #333;
  max-width: 680px;
}

.detail-screenshot {
  margin-top: 2rem;
}

.detail-screenshot img {
  display: block;
  width: 100%;
  max-width: 800px;
  border: 1.5px solid var(--border);
  border-radius: 4px;
}

.detail-screenshot figcaption {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.empty { font-size: 1.1rem; color: var(--muted); }

/* Contact links */
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.25rem;
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.contact-links a {
  color: var(--red);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}

.contact-links a:hover {
  color: var(--pink);
  text-decoration: underline;
}