/* ============================================================
   GLOBAL RESET & BASE
   (previously duplicated, with tiny drift, in every page's <style>)
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  background: #0a0a0f;
  color: #e8e8f0;
  overflow-x: hidden;
  opacity: 0;
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
body.visible {
  opacity: 1;
}

/* Used on the certification page to discourage casual copy/paste of
   certificate text (best-effort only — not real DRM). */
body.no-select {
  -webkit-user-select: none;
  user-select: none;
}

.section-eyebrow {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #6366f1;
  font-family: "Space Grotesk", sans-serif;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ============================================================
   BACK BAR (shared header on every inner page)
   ============================================================ */
.back-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  padding: 16px 48px;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: #9898b0;
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: color 0.2s ease;
}
.back-link i {
  font-size: 1rem;
  transition: transform 0.2s ease;
}
.back-link:hover {
  color: #f0f0f8;
}
.back-link:hover i {
  transform: translateX(-3px);
}
.back-bar-title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: #9898b0;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  pointer-events: none;
  white-space: nowrap;
  max-width: 50%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-top {
  padding-top: 72px;
}

.section-divider {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin: 0;
}

/* Shared footer / copyright strip */
.site-footer {
  background: #0f0f1a;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 24px 0;
  text-align: center;
}
.site-footer p {
  font-size: 0.8rem;
  color: #3a3a52;
  margin: 0;
}

@media (max-width: 768px) {
  .back-bar {
    padding: 14px 20px;
  }
}

/* ============================================================
   HOME (index.html) — hero split layout
   ============================================================ */
.hero-home {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  position: relative;
  overflow: hidden;
}
.hero-home::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 20% 50%, rgba(99, 102, 241, 0.12) 0%, transparent 70%),
    radial-gradient(ellipse 50% 50% at 80% 30%, rgba(139, 92, 246, 0.08) 0%, transparent 60%),
    linear-gradient(135deg, #0a0a0f 0%, #0f0f1a 100%);
  z-index: 0;
}
.hero-home::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 10%;
  height: 80%;
  width: 1px;
  background: linear-gradient(to bottom, transparent, rgba(99, 102, 241, 0.4), transparent);
  z-index: 1;
}
.hero-left {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px 60px 80px 80px;
}
.hero-eyebrow {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #6366f1;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.hero-name {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2.8rem, 5vw, 4.5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: #f0f0f8;
  margin-bottom: 16px;
}
.hero-name .accent {
  background: linear-gradient(135deg, #6366f1, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-tagline {
  font-size: 1.15rem;
  color: #9898b0;
  line-height: 1.6;
  max-width: 440px;
  margin-bottom: 48px;
}
.cursor {
  display: inline-block;
  width: 3px;
  height: 1.1em;
  background: #6366f1;
  margin-left: 4px;
  vertical-align: middle;
  animation: blink 1.1s step-end infinite;
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}
.hero-right {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 80px 80px 80px 80px;
}
.nav-label {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #55556a;
  margin-bottom: 36px;
}
.hero-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
}
.hero-nav-list li {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  overflow: hidden;
}
.hero-nav-list li:first-child {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.hero-nav-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
  text-decoration: none;
  color: #b8b8d0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: color 0.25s ease, padding-left 0.25s ease;
  position: relative;
}
.hero-nav-list a .link-num {
  font-size: 1.5rem;
  font-weight: 400;
  color: #3a3a52;
  font-family: "Inter", sans-serif;
  letter-spacing: 0.05em;
  margin-right: 16px;
  transition: color 0.25s ease;
}
.hero-nav-list a .link-arrow {
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  font-size: 1.2rem;
  color: #6366f1;
}
.hero-nav-list a:hover {
  color: #f0f0f8;
  padding-left: 12px;
}
.hero-nav-list a:hover .link-arrow {
  opacity: 1;
  transform: translateX(0);
}
.hero-nav-list a:hover .link-num {
  color: #6366f1;
}
.hero-nav-list a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%) scaleY(0);
  width: 3px;
  height: 60%;
  background: linear-gradient(to bottom, #6366f1, #a78bfa);
  border-radius: 2px;
  transition: transform 0.25s ease;
}
.hero-nav-list a:hover::before {
  transform: translateY(-50%) scaleY(1);
}
@media (max-width: 768px) {
  .hero-home {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .hero-home::after {
    display: none;
  }
  .hero-left {
    padding: 100px 28px 48px;
  }
  .hero-right {
    padding: 0 28px 80px;
  }
  .hero-nav-list a {
    font-size: 1.4rem;
    padding: 18px 0;
  }
}

/* ============================================================
   CONTACT (contact.html)
   ============================================================ */
.contact-list {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}
.contact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  gap: 16px;
}
.contact-row-label {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #55556a;
  display: flex;
  align-items: center;
  gap: 9px;
}
.contact-row-label i {
  font-size: 1rem;
  color: #6366f1;
}
.contact-row-value {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.15rem;
  font-weight: 500;
  color: #f0f0f8;
}
.social-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 100px;
  color: #9898b0;
  text-decoration: none;
  font-size: 0.88rem;
  font-family: "Space Grotesk", sans-serif;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.social-pill:hover {
  border-color: rgba(99, 102, 241, 0.5);
  color: #f0f0f8;
}

/* ============================================================
   PAGE HEADER (shared by certification.html & projects.html)
   ============================================================ */
.page-header {
  padding: 120px 0 56px;
  position: relative;
}
.page-header::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 60% 80% at 50% 0%, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
}
@media (max-width: 768px) {
  .back-bar-title {
    display: none;
  }
  .page-header {
    padding: 96px 0 40px;
  }
}

/* ============================================================
   CERTIFICATION (certification.html)
   ============================================================ */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  padding-bottom: 80px;
}
.cert-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 18px;
  padding: 32px 28px 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  transition: border-color 0.3s ease, background 0.3s ease, transform 0.3s ease;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.cert-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.5), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}
.cert-card:hover {
  border-color: rgba(99, 102, 241, 0.3);
  background: rgba(99, 102, 241, 0.04);
  transform: translateY(-4px);
}
.cert-card:hover::before {
  opacity: 1;
}
.cert-card:hover .cert-hint {
  opacity: 1;
}
.cert-hint {
  font-size: 0.75rem;
  color: #6366f1;
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: 0.05em;
  opacity: 0;
  transition: opacity 0.25s;
  display: flex;
  align-items: center;
  gap: 5px;
}
.cert-icon-wrap {
  width: 48px;
  height: 48px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 4px;
  flex-shrink: 0;
}
.cert-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: #f0f0f8;
  margin: 12px 0 8px;
  line-height: 1.3;
}
.cert-desc {
  font-size: 0.88rem;
  color: #9898b0;
  line-height: 1.7;
  margin: 0;
  flex: 1;
}
.btn-dl {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.25);
  color: #a5a7f5;
  font-size: 0.8rem;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 9px 18px;
  border-radius: 100px;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  align-self: flex-start;
  position: relative;
  z-index: 2;
}
.btn-dl:hover {
  background: rgba(99, 102, 241, 0.2);
  border-color: rgba(99, 102, 241, 0.45);
  color: #c4c5fa;
}

/* Cert modal viewer */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(5, 5, 10, 0.93);
  backdrop-filter: blur(18px);
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal-overlay.open {
  display: flex;
}
.modal-box {
  width: 100%;
  max-width: 860px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: #f0f0f8;
}
.modal-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}
.btn-close-modal {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #9898b0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: background 0.2s, color 0.2s;
}
.btn-close-modal:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #f0f0f8;
}
.pdf-wrap {
  position: relative;
  width: 100%;
  height: 72vh;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: #111118;
}
.pdf-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 10;
  background-image: repeating-linear-gradient(
    -45deg,
    transparent 0,
    transparent 60px,
    rgba(99, 102, 241, 0.055) 60px,
    rgba(99, 102, 241, 0.055) 62px
  );
}
.wm-canvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 11;
  opacity: 0.16;
}
.pdf-frame {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}
.cert-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.pdf-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #55556a;
  font-size: 0.88rem;
}
.pdf-placeholder i {
  font-size: 2.8rem;
  color: rgba(99, 102, 241, 0.35);
}
@media (max-width: 768px) {
  .cert-grid {
    grid-template-columns: 1fr;
  }
  .pdf-wrap {
    height: 55vh;
  }
  .modal-overlay {
    padding: 16px;
  }
}

/* ============================================================
   PROJECTS LIST (projects.html)
   ============================================================ */
.filter-pills {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 32px;
}
.pill {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 8px 20px;
  border-radius: 100px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: #9898b0;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
  letter-spacing: 0.02em;
}
.pill:hover {
  border-color: rgba(99, 102, 241, 0.4);
  color: #c4c4f0;
}
.pill.active {
  background: rgba(99, 102, 241, 0.18);
  border-color: rgba(99, 102, 241, 0.5);
  color: #a5a7f5;
}
.category-heading {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #55556a;
  margin: 72px 0 32px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.category-heading::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
}
.category-section.hidden {
  display: none;
}
.project-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  padding: 40px 48px;
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: border-color 0.3s, background 0.3s, transform 0.25s;
}
.project-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.4), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}
.project-card:hover {
  border-color: rgba(99, 102, 241, 0.3);
  background: rgba(99, 102, 241, 0.03);
  transform: translateY(-2px);
  color: inherit;
  text-decoration: none;
}
.project-card:hover::before {
  opacity: 1;
}
.project-card.reverse {
  direction: rtl;
}
.project-card.reverse > * {
  direction: ltr;
}
.project-info {
  padding-top: 4px;
}
.project-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.project-date {
  font-size: 0.75rem;
  color: #55556a;
  letter-spacing: 0.06em;
}
.project-tag {
  font-size: 0.68rem;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  color: #a5a7f5;
  border-radius: 100px;
  padding: 2px 10px;
  letter-spacing: 0.04em;
}
.project-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.45rem;
  font-weight: 600;
  color: #f0f0f8;
  margin-bottom: 12px;
  line-height: 1.25;
}
.project-desc {
  font-size: 0.92rem;
  color: #9898b0;
  line-height: 1.75;
}
.hero-image-wrap {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: #0d0d18;
  aspect-ratio: 16 / 10;
  position: relative;
}
.hero-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.project-card:hover .hero-image-wrap img {
  transform: scale(1.03);
}
@media (max-width: 900px) {
  .project-card {
    grid-template-columns: 1fr;
    padding: 28px;
    gap: 28px;
  }
  .project-card.reverse {
    direction: ltr;
  }
}

/* ============================================================
   PROJECT DETAIL (project-detail.html)
   ============================================================ */
.detail-page {
  display: none;
}
.detail-page.active {
  display: block;
}
.project-hero {
  padding: 100px 0 0;
  position: relative;
}
.project-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 70% at 50% 0%, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
  pointer-events: none;
}
.project-header-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: start;
  margin-bottom: 48px;
}
.project-h1 {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: #f0f0f8;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 16px;
}
.project-lead {
  font-size: 1rem;
  color: #9898b0;
  line-height: 1.8;
  max-width: 600px;
}
.meta-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.meta-chip {
  font-size: 0.72rem;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.22);
  color: #a5a7f5;
  border-radius: 100px;
  padding: 4px 12px;
  letter-spacing: 0.04em;
  font-family: "Space Grotesk", sans-serif;
}
.meta-chip.date {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
  color: #55556a;
}
.screenshots-grid {
  display: grid;
  margin-top: 32px;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  margin-bottom: 80px;
}
.screenshot-item {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: #0d0d18;
  cursor: pointer;
  position: relative;
  transition: border-color 0.2s, transform 0.2s;
}
.screenshot-item:hover {
  border-color: rgba(99, 102, 241, 0.3);
  transform: translateY(-2px);
}
.screenshot-item img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  transition: transform 0.35s ease;
}
.screenshot-item:hover img {
  transform: scale(1.02);
}
.screenshot-num {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(10, 10, 15, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 5px;
  padding: 2px 8px;
  font-size: 0.62rem;
  font-family: "Space Grotesk", sans-serif;
  color: rgba(255, 255, 255, 0.3);
  letter-spacing: 0.06em;
  backdrop-filter: blur(4px);
}
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.lightbox.open {
  opacity: 1;
  pointer-events: all;
}
.lightbox-inner {
  position: relative;
  max-width: min(92vw, 1200px);
  max-height: 90vh;
  width: 100%;
}
.lightbox-inner img,
.lightbox-inner video {
  width: 100%;
  height: auto;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 12px;
  display: block;
}
.lightbox-close {
  position: fixed;
  top: max(16px, env(safe-area-inset-top));
  right: max(16px, env(safe-area-inset-right));
  z-index: 510;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 15, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.75);
  font-size: 1.25rem;
  cursor: pointer;
  line-height: 1;
  backdrop-filter: blur(6px);
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}
.lightbox-close:hover {
  color: #fff;
  background: rgba(99, 102, 241, 0.35);
  border-color: rgba(99, 102, 241, 0.5);
}
.lightbox-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 510;
  background: rgba(10, 10, 15, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e8e8f0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.2rem;
  transition: background 0.2s, border-color 0.2s;
  backdrop-filter: blur(6px);
}
.lightbox-nav:hover {
  background: rgba(99, 102, 241, 0.35);
  border-color: rgba(99, 102, 241, 0.5);
}
.lightbox-prev {
  left: max(12px, env(safe-area-inset-left));
}
.lightbox-next {
  right: max(12px, env(safe-area-inset-right));
}
.lb-counter {
  position: fixed;
  bottom: max(14px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 510;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: 0.06em;
  white-space: nowrap;
  background: rgba(10, 10, 15, 0.6);
  padding: 4px 12px;
  border-radius: 100px;
  backdrop-filter: blur(6px);
}
@media (max-width: 768px) {
  .project-header-grid {
    grid-template-columns: 1fr;
  }
  .screenshots-grid {
    grid-template-columns: 1fr 1fr;
  }
  .lightbox-nav {
    width: 38px;
    height: 38px;
    font-size: 1.05rem;
  }
}
@media (max-width: 500px) {
  .screenshots-grid {
    grid-template-columns: 1fr;
  }
  .lightbox-nav {
    top: auto;
    bottom: max(14px, env(safe-area-inset-bottom));
    transform: none;
  }
  .lightbox-prev {
    left: 14px;
  }
  .lightbox-next {
    right: 14px;
  }
  .lb-counter {
    bottom: auto;
    top: max(16px, env(safe-area-inset-top));
  }
}
