/* projectsPage.css - Restored from testimonial.css */

/* --- Base & Reset --- */
:root {
  --primary-color: #130e0e;
  --secondary-color: #cccccc;
  --accent-color: #f0f0f0;
  --accent-warm: rgba(190, 138, 95, 0.9);
  --font-primary: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  font-family: var(--font-primary);
  background-color: var(--primary-color);
  color: var(--secondary-color);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Custom Cursor */
@media (pointer: fine) {
  body {
    cursor: none;
  }

  .cursor-outer,
  .cursor-inner {
    width: 32px;
    height: 32px;
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 9999;
    opacity: 1;
  }

  .cursor-outer {
    transition: all 0s ease-out;
    background: transparent;
  }

  .cursor-inner {
    background-color: rgba(155, 156, 149, 0.8);
    transition: all 0s ease-out;
  }

  .cursor-hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    transform: translate(-50%, -50%) scale(1.5) !important;
  }

  .cursor-inner.cursor-hover {
    background-color: rgba(255, 255, 255, 0) !important;
    transform: translate(-50%, -50%) scale(0.5) !important;
  }

  .cursor-hidden {
    opacity: 0;
  }
}

@media (pointer: coarse) {
  body {
    cursor: auto;
  }

  .cursor-outer,
  .cursor-inner {
    display: none;
  }
}

/* Content Protection */
* {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

/* Back Button Matching Portfolio */
.proj-back-btn {
  position: fixed;
  top: 2rem;
  left: 2rem;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  color: var(--secondary-color);
  text-decoration: none;
  font-weight: 500;
  opacity: 0.6;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 100;
  cursor: pointer;
}
.proj-back-btn:hover {
  opacity: 1;
  transform: translateX(-3px);
  color: var(--accent-color);
}

/* --- Layout --- */
.projects-showcase {
  height: 100vh;
  width: 100vw;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 0;
}

.showcase-wrapper {
  position: relative;
  width: 100%;
  max-width: 90rem; /* ~1440px */
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- Large Background Number --- */
.project-number-bg {
  position: absolute;
  left: -4rem; /* bleed off edge */
  top: 50%;
  transform: translateY(-50%);
  font-size: 28rem;
  font-weight: 700;
  color: rgba(240, 240, 240, 0.03); /* text-foreground/[0.03] */
  line-height: 1;
  letter-spacing: -0.05em;
  pointer-events: none;
  user-select: none;
  z-index: 0;
  transition: transform 0.1s ease-out; /* For optional parallax */
}

/* Animation for number change */
.project-number-bg.entering {
  animation: numberFadeIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes numberFadeIn {
  from {
    opacity: 0;
    transform: translateY(-50%) scale(0.8);
    filter: blur(10px);
  }
  to {
    opacity: 1;
    transform: translateY(-50%) scale(1);
    filter: blur(0);
  }
}

/* --- Main Content Area --- */
.showcase-content {
  position: relative;
  display: flex;
  width: 100%;
  max-width: 80rem;
  padding-left: 2rem;
  padding-right: 2rem;
  z-index: 10;
}

/* Left Sidebar (Vertical Text + Progress) */
.showcase-sidebar {
  display: flex;
  flex-direction: column;
  align-items: center; /* FIXED: items-align -> align-items */
  justify-content: center;
  padding-right: 4rem;
  border-right: 1px solid rgba(240, 240, 240, 0.1); /* border-border */
}

.showcase-label {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-family: monospace;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(204, 204, 204, 0.5); /* text-muted-foreground */
  animation: fadeIn 0.4s 0.3s forwards;
  opacity: 0;
}

/* Vertical Progress Line */
.showcase-progress {
  position: relative;
  width: 1px;
  height: 8rem;
  background: rgba(240, 240, 240, 0.1);
  margin-top: 2rem;
}

.showcase-progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--progress-pct, 0%);
  background: var(--accent-color); /* text-foreground */
  transition: height 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  transform-origin: top;
}

/* Right Content (Project Details) */
.showcase-main {
  flex: 1;
  padding-left: 4rem;
  padding-top: 3rem;
  padding-bottom: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Project Type Badge */
.project-type {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  border: 2px solid rgba(100, 94, 89, 0.632);
  border-radius: 9999px;
  font-family: monospace;
  font-size: 0.75rem;
  color: rgba(204, 204, 204, 0.7);
  width: fit-content;
  margin-bottom: 2rem;
  opacity: 0;
  transform: translateX(-20px);
}

.project-type.visible {
  transition: opacity 0.4s, transform 0.4s;
  opacity: 1;
  transform: translateX(0);
}

.project-type-dot {
  width: 0.375rem;
  height: 0.375rem;
  background-color: var(--accent-warm); /* bg-accent */
  border-radius: 50%;
}

/* Project Title (Word by word reveal) */
.project-title {
  font-family: Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 300;
  color: var(--accent-color);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
  min-height: auto; /* Prevent large gap */
}

.project-title-word {
  display: inline-block;
  margin-right: 0.3em;
  opacity: 0;
  transform: translateY(20px) rotateX(90deg);
}

.project-title-word.visible { /* FIXED: selector targeting span directly */
  transition: opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  opacity: 1;
  transform: translateY(0) rotateX(0);
}

/* Project Description */
.project-description {
  font-size: 1.1rem;
  min-height: auto; 
  color: rgba(240, 240, 240, 0.85);
  max-width: 600px;
  margin-bottom: 2rem;
  line-height: 1.6;
  font-weight: 300;
  letter-spacing: 0.01em;
  opacity: 1; /* Container is visible */
}

.desc-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(15px);
  margin-right: 0.25em; /* Space between words */
  transition: all 0.5s cubic-bezier(0.2, 1, 0.3, 1);
  will-change: opacity, transform;
}

.desc-word.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Tech Stack */
.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2rem;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.5s ease 0.3s;
}
.project-tech.visible {
  opacity: 1;
  transform: translateY(0);
}

.project-tech span {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent-warm);
  background: transparent;
  border: 1px solid var(--accent-warm);
  padding: 0.5rem 1.2rem;
  border-radius: 50px;
  transition: all 0.3s ease;
  cursor: default;
}

.project-tech span:hover {
  background: var(--accent-warm);
  color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(190, 138, 95, 0.15);
}

/* Buttons */
.project-buttons {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 3rem;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
  pointer-events: none; /* Block clicks until visible */
}

.project-buttons.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.project-btn {
  padding: 0.8rem 1.8rem;
  border-radius: 30px;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

/* Live Demo Button */
.project-btn.demo-link {
  background: var(--accent-warm);
  color: #1a1515;
  border: 1px solid var(--accent-warm);
  box-shadow: 0 4px 15px rgba(190, 138, 95, 0.2);
}
.project-btn.demo-link:hover:not(.disabled) {
  transform: translateY(-2px);
  background: #deb887; /* darker warm */
  border-color: #deb887;
  box-shadow: 0 6px 20px rgba(190, 138, 95, 0.3);
}

/* View Code Button */
.project-btn.github-link {
  background: transparent;
  color: var(--accent-color);
  border: 1px solid rgba(240, 240, 240, 0.3);
}
.project-btn.github-link:hover:not(.disabled) {
  border-color: var(--accent-color);
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-2px);
}

/* Disabled State */
.project-btn.disabled {
  opacity: 0.3;
  cursor: not-allowed;
  filter: grayscale(1);
  pointer-events: none;
}

/* Project Footer */
.project-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.project-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  opacity: 0;
  transform: translateY(20px); /* RESTORED: 20px based on user preference */
}

.project-meta.visible {
  transition: opacity 0.4s 0.4s, transform 0.4s 0.4s;
  transform: translateY(-5px); /* Final position slightly up */
  opacity: 1;
}

.project-meta-line {
  width: 2rem;
  height: 1px;
  background: var(--accent-color);
  transform: scaleX(0);
  transform-origin: left;
}

.project-meta.visible .project-meta-line {
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.5s;
  transform: scaleX(1);
}

.project-count {
  font-size: 0.95rem;
  color: var(--secondary-color);
  font-family: 'Courier New', monospace;
  margin: 0;
}

/* Navigation */
.showcase-nav {
  position: absolute;
  right: 2rem;
  bottom: 5rem;
  display: flex;
  gap: 1rem;
  z-index: 10;
}

.showcase-nav-btn {
  position: relative;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  border: 2px solid rgba(240, 240, 240, 0.679);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.3s;
}

.showcase-nav-btn:active {
  transform: scale(0.95);
}

.showcase-nav-btn svg {
  position: relative;
  z-index: 10;
  color: rgba(240, 240, 240, 0.679);
  transition: color 0.3s;
}

.showcase-nav-btn:hover svg {
  color: rgba(0, 0, 0, 0.679);
}

.showcase-nav-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(240, 240, 240, 0.679);
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.showcase-nav-btn:hover::before {
  transform: translateX(0);
}

/* Ticker at bottom */
.project-ticker {
  position: absolute;
  bottom: 1rem;
  left: -5rem;
  right: 0;
  overflow: hidden;
  opacity: 0.15;
  pointer-events: none;
  font-size: 50px;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
  color: rgb(239, 235, 232);
}

.project-ticker-content {
  display: inline-block;
  animation: ticker 10s linear infinite;
  white-space: nowrap;
}

@keyframes ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes fadeIn {
  to { opacity: 1; }
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
@media (max-width: 900px) {
  html, body {
    overflow-x: hidden;
    overflow-y: auto;
    width: 100%;
    max-width: 100vw;
  }

  .projects-showcase {
    height: auto;
    min-height: 100vh;
    overflow: visible;
    padding: 0;
    width: 100%;
    max-width: 100vw;
  }

  .showcase-wrapper {
    flex-direction: column;
    padding: 5rem 1.5rem 8rem 1.5rem;
    height: auto;
    max-width: 100%;
    width: 100%;
  }
  
  .proj-back-btn {
    top: 1rem;
    left: 1rem;
    font-size: 0.85rem;
  }
  
  .project-number-bg {
    font-size: 6rem !important;
    left: -1rem;
    top: 4rem;
    transform: none;
    z-index: 0;
    opacity: 0.05 !important;
    line-height: 1;
  }

  .showcase-content {
    flex-direction: column;
    padding: 0;
    gap: 0;
    width: 100%;
    max-width: 100%;
  }
  
  .showcase-sidebar {
    flex-direction: row;
    border-right: none;
    border-bottom: 1px solid rgba(240, 240, 240, 0.1);
    padding: 0 0 1rem 0;
    width: 100%;
    margin-bottom: 2rem;
    align-items: center;
    justify-content: flex-start;
  }
  
  .showcase-label {
    writing-mode: horizontal-tb;
    margin-right: 1rem;
    font-size: 0.7rem;
  }
  
  .showcase-progress {
    width: 80px;
    height: 1px;
    margin-top: 0;
  }
  
  .showcase-progress-fill {
    height: 100%;
    width: var(--progress-pct, 0%);
    transition: width 0.5s ease;
  }
  
  .showcase-main {
    padding: 0;
    width: 100%;
    max-width: 100%;
  }

  .project-type {
    margin-bottom: 1.5rem;
    font-size: 0.7rem;
    padding: 0.2rem 0.6rem;
  }

  .project-title {
    font-size: 2rem !important;
    margin-bottom: 1rem;
    line-height: 1.2;
    min-height: auto;
  }

  .project-description {
    font-size: 0.95rem !important;
    line-height: 1.5;
    margin-bottom: 1.5rem;
    min-height: auto;
  }

  .project-tech {
    gap: 0.5rem;
    margin-bottom: 1.5rem;
  }

  .project-tech span {
    font-size: 0.75rem;
    padding: 0.4rem 0.8rem;
  }

  .project-buttons {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2rem;
  }

  .project-btn {
    flex: 1;
    min-width: 140px;
    justify-content: center;
    padding: 0.8rem 1.5rem;
  }

  .project-footer {
    flex-direction: column;
    gap: 1.5rem;
    align-items: flex-start;
  }

  .project-meta {
    transform: translateY(0) !important;
  }
  
  .showcase-nav {
    position: relative;
    bottom: auto;
    right: auto;
    margin-top: 0;
    justify-content: flex-start;
  }

  .showcase-nav-btn {
    width: 2.5rem;
    height: 2.5rem;
  }

  .project-ticker {
    font-size: 2rem !important;
    bottom: 0.5rem;
    left: -2rem;
    right: 0;
  }
}
