/* Styles for the data-driven parts of the site (projects, lab log, notes).
   Built on the theme variables in style.css. */

.lab-meta {
  font-size: 0.8rem;
  color: var(--bs-gray);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.lab-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--bs-light);
  color: var(--bs-dark);
  white-space: nowrap;
}
.lab-badge.is-live { background: #e3f5e8; color: #1d6b36; }
.lab-badge.is-private { background: var(--bs-secondary); color: var(--bs-primary-dark); }
.lab-badge.is-active { background: var(--bs-primary); color: #fff; }
.lab-badge.is-build { background: #e8eef9; color: #2a4a8a; }
.lab-badge.is-work { background: #efe9f7; color: #5a3a8a; }

.pulse-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bs-primary);
  margin-right: 0.4rem;
  box-shadow: 0 0 0 0 rgba(var(--bs-primary-rgb), 0.6);
  animation: lab-pulse 2s infinite;
}
@keyframes lab-pulse {
  70% { box-shadow: 0 0 0 8px rgba(var(--bs-primary-rgb), 0); }
  100% { box-shadow: 0 0 0 0 rgba(var(--bs-primary-rgb), 0); }
}

/* Cover placeholder for projects without an image yet */
.lab-cover {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 0.375rem;
  background: var(--bs-light);
}
.lab-cover img {
  position: relative; /* sit above the letter fallback */
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.lab-cover .lab-cover-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  font-weight: 900;
  color: rgba(var(--bs-primary-rgb), 0.85);
  background: linear-gradient(135deg, var(--bs-secondary), var(--bs-light));
}

/* Portfolio cards */
.lab-card {
  display: block;
  color: inherit;
  text-decoration: none;
}
.lab-card:hover { color: inherit; }
.lab-card:hover .lab-cover img { transform: scale(1.04); }
.lab-card .lab-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0.75rem 0 0.25rem;
  color: var(--bs-dark);
}
.lab-card:hover .lab-card-title { color: var(--bs-primary); }
.lab-card .lab-card-tagline {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 0.4rem;
}

/* "Currently in the lab" rows on the homepage */
.now-item {
  border-bottom: 1px solid #e5e5e5;
}
.now-item .now-commit {
  font-family: SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8rem;
  color: #555;
}

/* Lab log timeline */
.timeline {
  list-style: none;
  padding-left: 0;
  border-left: 2px solid var(--bs-light);
  margin-left: 0.5rem;
}
.timeline li {
  position: relative;
  padding: 0 0 1.5rem 1.5rem;
}
.timeline li::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 0.45rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--bs-gray);
}
.timeline li.is-note::before {
  background: var(--bs-primary);
  border-color: var(--bs-primary);
}
.timeline .timeline-text {
  margin: 0.15rem 0 0;
}
.timeline .timeline-day {
  font-weight: 700;
  margin: 1.5rem 0 0.75rem -0.5rem;
  padding-left: 1.5rem;
  list-style: none;
}
.timeline .timeline-day::before { display: none; }

/* Markdown content (project write-ups and lab notes) */
.prose { font-size: 1rem; line-height: 1.8; }
.prose img { max-width: 100%; height: auto; border-radius: 0.375rem; margin: 1rem 0; }
.prose h2 { margin-top: 2.5rem; }
.prose h3 { margin-top: 2rem; }
.prose pre {
  background: #1e1e1e;
  color: #eee;
  padding: 1rem;
  border-radius: 0.375rem;
  font-size: 0.85rem;
}
.prose blockquote {
  border-left: 3px solid var(--bs-primary);
  padding-left: 1rem;
  color: #555;
}

#lab-filters a { color: var(--bs-gray-dark); font-size: 0.85rem; letter-spacing: 0.05em; }
#lab-filters a:hover,
#lab-filters a.is-checked { color: var(--bs-primary); }
.lab-cover.sm .lab-cover-fallback { font-size: 1.6rem; }
@media (max-width: 575px) {
  .lab-cover .lab-cover-fallback { font-size: 2.2rem; }
  .lab-card .lab-card-title { font-size: 0.95rem; }
  .lab-card .lab-card-tagline { font-size: 0.8rem; }
}
.pick-thumb { width: 140px; }
@media (max-width: 575px) {
  .pick-thumb { width: 84px; }
  #picks-list .project-item { padding-left: 0 !important; padding-right: 0 !important; }
  #picks-list .project-title { font-size: 1.05rem; }
}

/* ------------------------------------------------------------------ */
/* Project page                                                        */
/* ------------------------------------------------------------------ */
.project-hero { max-width: 760px; }
.project-pitch {
  font-size: 1.35rem;
  line-height: 1.5;
  font-weight: 300;
  color: #444;
  margin-bottom: 1rem;
}
.project-textlink {
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}
.project-hero-shot { margin: 3rem 0 0; }

/* Screenshot frames */
.shot-frame {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06), 0 18px 45px rgba(0, 0, 0, 0.12);
  padding-top: 28px;
}
.shot-frame::before {
  /* browser chrome with three dots */
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 28px;
  background:
    radial-gradient(circle, #ff5f57 4px, transparent 4.5px) 14px 50% / 12px 12px no-repeat,
    radial-gradient(circle, #febc2e 4px, transparent 4.5px) 32px 50% / 12px 12px no-repeat,
    radial-gradient(circle, #28c840 4px, transparent 4.5px) 50px 50% / 12px 12px no-repeat,
    var(--bs-light);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.shot-frame img,
.phone-frame img { display: block; width: 100%; height: auto; }
.phone-frame {
  max-width: 270px;
  margin: 0 auto;
  padding: 10px;
  border-radius: 38px;
  background: #1b1b1b;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.18);
}
.phone-frame img { border-radius: 28px; }

/* Quick facts strip */
.project-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.5rem 2rem;
  margin: 4rem 0 0;
  padding: 1.75rem 0;
  border-top: 1px solid #e5e5e5;
  border-bottom: 1px solid #e5e5e5;
}
.project-facts dt {
  font-size: 0.75rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--bs-gray);
  margin-bottom: 0.25rem;
}
.project-facts dd { margin: 0; font-weight: 700; color: var(--bs-dark); }

.project-section { margin-top: 6rem; }

/* Feature tour */
.tour-step + .tour-step { margin-top: 5rem; }
.tour-copy { max-width: 420px; }
.tour-copy .service-number { display: block; font-size: 1.4rem; margin-bottom: 0.5rem; }
.tour-title { font-size: 1.6rem; font-weight: 700; margin-bottom: 0.75rem; }
.tour-copy p { font-size: 1.05rem; color: #555; }

.feature-card {
  display: flex;
  gap: 1rem;
  height: 100%;
  padding: 1.5rem;
  border-radius: 0.5rem;
  background: var(--bs-light);
}

/* Closing call to action */
.project-cta {
  margin-top: 6rem;
  padding: 2.5rem;
  border-radius: 0.75rem;
  background: var(--bs-secondary);
}
.project-cta .hp-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Next project */
.project-next {
  display: block;
  margin-top: 5rem;
  padding: 2rem 0;
  border-top: 1px solid #e5e5e5;
  color: inherit;
  text-decoration: none;
}
.project-next:hover { color: inherit; }
.project-next-title {
  display: block;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  color: var(--bs-dark);
  transition: color 0.2s;
}
.project-next:hover .project-next-title { color: var(--bs-primary); }
.project-next-thumb { width: 160px; flex-shrink: 0; }

@media (max-width: 991px) {
  .project-section { margin-top: 4rem; }
  .tour-step + .tour-step { margin-top: 3.5rem; }
  .tour-copy { max-width: none; }
}
@media (max-width: 575px) {
  .project-pitch { font-size: 1.15rem; }
  .project-cta { padding: 1.5rem; }
  .shot-frame { padding-top: 20px; border-radius: 8px; }
  .shot-frame::before { height: 20px; background-size: 9px 9px; }
  .project-facts { grid-template-columns: 1fr 1fr; }
}
.project-cta-btn { white-space: normal; overflow-wrap: anywhere; }
@media (min-width: 992px) { .project-cta-btn { white-space: nowrap; } }
@media (max-width: 991px) { .project-cta-btn { display: block; width: 100%; } }

/* Homepage */
.hero-bio {
  font-size: 1.15rem;
  line-height: 1.6;
  font-weight: 300;
  color: #444;
  max-width: 34rem;
  margin: 1rem 0 1.5rem;
}
.contact-links li { padding: 0.35rem 0; }
.contact-links a { text-decoration: none; font-weight: 500; }
.contact-links a:hover { text-decoration: underline; }

/* Section watermark icons: keep them in the top-right corner, clear of
   buttons and lists. (Overrides the per-section positions in style.css.) */
@media (min-width: 769px) {
  main #home.bg-text:before,
  main #portfolio.bg-text:before,
  main #education.bg-text:before,
  main #interests.bg-text:before,
  main #contact.bg-text:before {
    width: 180px;
    height: 180px;
    top: 0;
    right: 0;
    transform: none;
  }
}
