/* ============================================
   PROJECTS — Mobile-First Project Showcase
   ============================================ */

.greenhouse-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.project-card {
  background: var(--bg-primary);
  border: var(--border-thick);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-brutal);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  cursor: pointer;
  position: relative;
}

.project-card:hover {
  transform: translate(-4px, -4px);
  box-shadow: 10px 10px 0px 0px var(--text-primary);
}

/* Device Mockup Frame */
.project-device-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: #1a1a2e;
  border-bottom: var(--border-thick);
}

.project-device-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.project-card:hover .project-device-frame img {
  transform: scale(1.04);
}

/* Status Bar inside device frame */
.device-status-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 28px;
  background: rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 6px;
  z-index: 2;
}

.device-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.device-dot:nth-child(1) { background: #ff5f56; }
.device-dot:nth-child(2) { background: #ffbd2e; }
.device-dot:nth-child(3) { background: #27c93f; }

/* Project Info */
.project-info {
  padding: 1.5rem;
}

.project-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-green);
  margin-bottom: 0.5rem;
}

.project-name {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 4vw, 1.8rem);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 0.5rem;
}

.project-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.project-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}

.stack-tag {
  background: var(--bg-secondary);
  border: 2px solid var(--text-primary);
  border-radius: 50px;
  padding: 0.25rem 0.7rem;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.project-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--accent-green);
  text-decoration: none;
  transition: gap var(--transition-fast), color var(--transition-fast);
}

.project-cta:hover {
  gap: 0.75rem;
}

/* ---- Project Detail Overlay (Editorial Layout) ---- */
.project-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: var(--bg-primary);
  overflow-y: auto;
  overscroll-behavior: contain;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.project-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* Close button — fixed top right */
.project-overlay-close {
  position: fixed;
  top: 1.25rem;
  right: 1.5rem;
  z-index: 100001;
  background: var(--bg-primary);
  border: var(--border-thick);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  cursor: pointer;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-brutal);
  transition: all var(--transition-fast);
  opacity: 0;
  pointer-events: none;
}

.project-overlay.active .project-overlay-close {
  opacity: 1;
  pointer-events: auto;
}

.project-overlay-close:hover {
  background: var(--accent-green);
  color: #fff;
  transform: translate(-1.5px, -1.5px);
  box-shadow: var(--shadow-brutal-hover);
}

/* Body container */
.project-overlay-body {
  max-width: 820px;
  margin: 0 auto;
  padding: 4rem 2rem 5rem;
}

/* Hero block — big title + meta */
.project-overlay-hero {
  margin-bottom: 2.5rem;
}

.project-overlay-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.project-overlay-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.project-overlay-meta span:first-child {
  color: var(--accent-green);
  font-weight: 700;
}

/* Description */
.project-overlay-desc {
  font-family: var(--font-sans);
  font-size: 1.15rem;
  line-height: 1.85;
  color: var(--text-muted);
  margin-bottom: 3rem;
  max-width: 680px;
}

/* Section blocks (The work, Outcome) */
.project-overlay-section {
  margin-bottom: 3rem;
}

.project-overlay-heading {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.4rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-primary);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2.5px solid var(--accent-green);
  display: inline-block;
}

.project-overlay-text {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-muted);
  max-width: 680px;
}

/* Screenshots — Desktop vs Smaller Screen Responsive Layout */
.project-overlay-screenshots {
  display: flex;
  flex-direction: column;
  margin-bottom: 3rem;
}

.project-img-desktop {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
  margin-bottom: 1.5rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-img-desktop:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.1);
}

.project-img-mobile-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  justify-items: center;
  margin-top: 1rem;
}

.project-img-portrait {
  width: 100%;
  max-width: 320px;
  height: auto;
  display: block;
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-img-portrait:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.12);
}

@media (min-width: 768px) {
  .project-img-desktop {
    display: block;
  }
  .project-img-mobile-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
  }
}

@media (max-width: 767px) {
  .project-img-desktop {
    display: none;
  }
}

/* Visit CTA */
.project-overlay-visit {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--text-primary);
  color: var(--bg-primary);
  border: var(--border-thick);
  border-radius: 50px;
  padding: 1rem 2.5rem;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1rem;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: var(--shadow-brutal);
  transition: all var(--transition-fast);
}

.project-overlay-visit:hover {
  background: var(--accent-green);
  color: #fff;
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0px 0px var(--text-primary);
}

/* ============================================
   DESKTOP OVERRIDES
   ============================================ */
@media (min-width: 768px) {
  .greenhouse-grid {
    grid-template-columns: 1fr 1fr;
  }

  .project-info {
    padding: 2rem;
  }

  .project-overlay-body {
    padding: 5rem 3rem 6rem;
  }

  .project-overlay-close {
    top: 2rem;
    right: 2.5rem;
  }
}

