:root {
  --bg: #fafaf8;
  --ink: #1a1a1a;
  --muted: #6b6b6b;
  --line: #dddad3;
  --accent: #c4622d;
  --gitblue: #0366d6;
}

* {
  box-sizing: border-box;
}

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

body {
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Header */

.gh-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  line-height: 1;
  text-decoration: none;
  color: #24292e;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  color: var(--muted);
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;

}

.gh-avatar {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  object-fit: cover;
  transition: transform 0.2s ease;
  flex-shrink: 0;
  margin-right: 5px;
}

.gh-link:hover .gh-avatar {
  transform: scale(1.75);
}

.gh-link:hover .gh-name {
  text-decoration: underline;
}

.gh-link:hover .gh-name {
  color: var(--accent);
  border-color: var(--accent);
}

.header {
  max-width: 960px;
  margin: 0 auto;
  padding: 64px 24px 40px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 1px solid var(--line);
}

.header__name {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--gitblue);
}

.header__link {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 13px;
  color: var(--muted);
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.header__link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.header__name:hover .folder {
  text-decoration: underline;
  filter: brightness(125%);
}

/* Grid */

.grid {
  max-width: 960px;
  margin: 0 auto;
  padding: 48px 24px 80px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px 32px;
}

/* Card */

.card {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card__index {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.card__frame {
  display: block;
  position: relative;
  border: 1px solid var(--line);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: #fff;
  transition: border-color 0.15s ease;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  cursor: pointer;
}

.card__frame:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.card__image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: grayscale(75%);
  transition: filter 0.2s ease, transform 0.3s ease;
  -webkit-user-drag: none;
}

.card__frame:hover {
  border-color: var(--accent);
}

.card__frame:hover .card__image {
  filter: grayscale(0%);
  transform: scale(1.02);
}

.card__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: rgba(250, 250, 248, 0.85);
  color: var(--ink);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease, background 0.15s ease;
}

.card__arrow--prev {
  left: 8px;
}

.card__arrow--next {
  right: 8px;
}

.card__frame:hover .card__arrow,
.card__frame:focus-visible .card__arrow {
  opacity: 1;
}

.card__arrow:hover {
  background: var(--accent);
  color: #fff;
}

/* Image dots (only present when a project has more than one screenshot) */

.card__dots {
  display: flex;
  gap: 6px;
  padding-top: 2px;
}

.card__dot {
  width: 6px;
  height: 6px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--line);
  cursor: pointer;
  transition: background 0.15s ease;
}

.card__dot:hover {
  background: var(--muted);
}

.card__dot.is-active {
  background: var(--accent);
}

.card__dot:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Title row: name on the left, optional repo icon flush right */

.card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 2px;
}

.card__name {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.005em;
  transition: color 0.15s ease;
}

.card__name:hover {
  color: var(--accent);
}

.card__repo {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  transition: color 0.15s ease;
}

.card__repo:hover {
  color: var(--accent);
}

.card__desc {
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
  margin: 0;
}

/* Footer */

.footer {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 24px 56px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 11px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

/* Responsive */

@media (max-width: 720px) {
  .grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .header {
    padding: 48px 20px 32px;
  }

  .header__name {
    font-size: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
