:root {
  --color-bg: #ffffff;
  --color-text: #1a1a1a;
  --color-muted: #5a5a5a;
  --color-accent: #2454ff;
  --color-live: #1a7f37;
  --color-progress: #9a6700;
  --color-border: #e2e2e2;
  --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --hero-photo-size: 260px;
  --lightbox-photo-size: 400px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-padding-top: 4.5rem;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-stack);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.5;
}

.site-nav {
  position: sticky;
  top: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  padding: 1rem 2rem;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  z-index: 10;
}

.site-nav a {
  color: var(--color-text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}

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

.hero {
  padding: 3rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

.name-strip {
  background: #274dd3;
  border-radius: 8px;
  padding: 1.5rem 1.75rem;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  overflow: hidden;
}

.name-strip-text {
  flex-shrink: 0;
}

.name-strip h1 {
  margin: 0 0 0.25rem;
  font-size: 2.5rem;
  color: #fff;
}

.hero-title {
  margin: 0;
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.1rem;
  font-weight: 600;
}

.hero-yaml-card {
  flex: 1;
  min-width: 0;
}

.hero-yaml {
  margin: 0;
  padding: 0;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.85rem;
  line-height: 1.65;
  word-break: break-word;
  background: none;
  color: rgba(255, 255, 255, 0.85);
}

/* Hidden only while JavaScript is in play, so script.js can measure the block
   and blank it without the finished text flashing first. A visitor with
   JavaScript off never gets the .js class, and sees the block as normal. */
.js .hero-yaml {
  visibility: hidden;
}

.yaml-line {
  padding-left: 1.4em;
  text-indent: -1.4em;
}

.yaml-cursor {
  display: inline-block;
  width: 0.5em;
  height: 1em;
  margin-left: 0.05em;
  vertical-align: text-bottom;
  background: #ffd479;
  animation: yaml-cursor-blink 1s steps(2, start) infinite;
}

@keyframes yaml-cursor-blink {
  to {
    visibility: hidden;
  }
}

@media (prefers-reduced-motion: reduce) {
  .yaml-cursor {
    animation: none;
  }
}

.yaml-rule {
  color: rgba(255, 255, 255, 0.4);
}

.yaml-key {
  color: #ffd479;
}

.yaml-str {
  color: #fff;
}

.hero-body {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.hero-photo-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}

.hero-photo-button {
  padding: 0;
  border: 0;
  background: none;
  border-radius: 50%;
  cursor: zoom-in;
  display: block;
  line-height: 0;
}

.hero-photo-button:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

.hero-photo {
  width: var(--hero-photo-size);
  height: var(--hero-photo-size);
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--color-border);
  transition: transform 0.15s ease;
}

.hero-photo-button:hover .hero-photo,
.hero-photo-button:focus-visible .hero-photo {
  transform: scale(1.03);
}

@media (prefers-reduced-motion: reduce) {
  .hero-photo {
    transition: none;
  }

  .hero-photo-button:hover .hero-photo,
  .hero-photo-button:focus-visible .hero-photo {
    transform: none;
  }
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: rgba(0, 0, 0, 0.78);
  cursor: zoom-out;
}

.lightbox[hidden] {
  display: none;
}

.lightbox-image {
  /* Square source, so one dimension keeps it a true circle at any viewport. */
  width: min(90vw, 80vh, var(--lightbox-photo-size));
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
  cursor: default;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.24);
}

.lightbox-close:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.hero-links {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.75rem;
}

.hero-github {
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}

.hero-github:hover {
  text-decoration: underline;
}

.hero-content {
  flex: 1;
  min-width: 0;
}

.hero-greeting {
  margin: 0 0 0.4rem;
  font-weight: 600;
}

.hero-intro {
  margin: 0 0 0.85rem;
  max-width: 80ch;
}

@media (max-width: 600px) {
  .name-strip {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    text-align: center;
  }

  .hero-yaml {
    font-size: 0.7rem;
  }

  .hero-body {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .hero-photo {
    --hero-photo-size: 200px;
  }
}

.category {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 2rem;
  border-top: 1px solid var(--color-border);
}

.category h2 {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
}

.category-subheading {
  margin: 0 0 1.5rem;
  color: var(--color-muted);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.card {
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.card--has-ribbon {
  position: relative;
  overflow: hidden;
}

.card-ribbon-wrap {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 72px;
  height: 72px;
  pointer-events: none;
}

.card-ribbon {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 170px;
  padding: 0.3rem 0;
  transform: translate(-50%, -50%) rotate(-45deg);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  text-align: center;
}

.card-ribbon--live {
  background: var(--color-accent);
}

.card-ribbon--article {
  background: var(--color-live);
}

.card-ribbon--soon {
  background: var(--color-progress);
}

.card-title {
  margin: 0;
  font-size: 1.05rem;
}

.card-description {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.92rem;
  flex-grow: 1;
}

.card-status {
  align-self: flex-start;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
}

.status-live {
  background: rgba(26, 127, 55, 0.12);
  color: var(--color-live);
}

.status-progress {
  background: rgba(154, 103, 0, 0.12);
  color: var(--color-progress);
}

.card-link {
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}

.card-link:hover {
  text-decoration: underline;
}

.card-link-spacer {
  visibility: hidden;
}

.site-footer {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 2rem 3rem;
  border-top: 1px solid var(--color-border);
  text-align: center;
}

.footer-heading {
  margin: 0 0 0.75rem;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--color-muted);
}

.footer-intro {
  margin: 0 0 1.25rem;
  color: var(--color-muted);
}

.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.footer-link {
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}

.footer-link:hover {
  text-decoration: underline;
}

.footer-links-sep {
  color: var(--color-accent);
  font-size: 1.3rem;
  line-height: 1;
}
