/* ========================================
   PROJECTS PAGE - Vakhim Krean 2025
   Fully Responsive • Consistent Design • Smooth Animations
======================================== */

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(135deg, #0a0a1a, #1a1a2e);
  color: #e0e0ff;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background 0.6s ease, color 0.6s ease;
}

body.light {
  background: linear-gradient(135deg, #f8faff, #e6ecff);
  color: #1a1a2e;
}

/* ===== NAVBAR (Identical across all pages) ===== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  padding: 1.3rem 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(16px);
  background: rgba(10,10,26,0.75);
  border-bottom: 1px solid rgba(0,221,235,0.2);
  transition: all 0.4s ease;
}

.navbar.scrolled {
  padding: 0.9rem 5%;
  background: rgba(10,10,26,0.95);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.logo {
  font-size: 1.9rem;
  font-weight: 700;
  background: linear-gradient(90deg, #00ddeb, #00ffaa);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: logoPulse 3s infinite ease-in-out;
}

@keyframes logoPulse {
  0%, 100% { text-shadow: 0 0 12px rgba(0,221,235,.5); }
  50%     { text-shadow: 0 0 25px rgba(0,221,235,.9), 0 0 35px rgba(0,255,170,.7); }
}

.nav-links {
  display: flex;
  margin-right: 20px;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  color: #e0e0ff;
  text-decoration: none;
  font-weight: 500;
  position: relative;
  transition: color 0.3s;
}

.nav-links a.active,
.nav-links a:hover { color: #00ddeb; }

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  width: 0;
  height: 2px;
  background: #00ddeb;
  border-radius: 1px;
  transition: all 0.4s ease;
  transform: translateX(-50%);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
  left: 0;
  transform: none;
}

/* Hamburger Menu */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 6px;
  margin-right: 80px;
  width: 32px;
  height: 24px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1002;
}

.hamburger .bar {
  width: 100%;
  height: 4px;
  background: #00ddeb;
  border-radius: 10px;
  transition: all 0.35s cubic-bezier(0.68,-0.55,0.265,1.55);
}

.hamburger.active .bar:nth-child(1) { transform: translateY(10px) rotate(45deg); }
.hamburger.active .bar:nth-child(2) { opacity: 0; }
.hamburger.active .bar:nth-child(3) { transform: translateY(-10px) rotate(-45deg); }

/* Mobile Menu Overlay */
@media (max-width: 868px) {
  .hamburger { display: flex; }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    height: 100vh;
    width: 300px;
    background: rgba(10,10,26,0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 3.5rem;
    padding: 2rem;
    box-shadow: -15px 0 40px rgba(0,0,0,0.6);
    transition: right 0.5s cubic-bezier(0.77,0,0.18,1);
    z-index: 1001;
  }

  .nav-links.active { right: 0; }

  .nav-links a {
    font-size: 1.6rem;
    font-weight: 600;
  }

  .nav-links a::after { display: none; }
}

body.menu-open::before {
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 1000;
  pointer-events: none;
}

/* Theme Toggle Button */
.theme-btn {
  position: fixed;
  top: 10px;
  right: 20px;
  z-index: 1001;
  width: 50px;
  height: 50px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(0,221,235,0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.3s;
}

.theme-btn:hover {
  transform: scale(1.12);
  box-shadow: 0 0 22px rgba(0,221,235,0.6);
}

.theme-btn .icon {
  width: 26px;
  height: 26px;
  position: absolute;
  transition: transform 0.5s ease, opacity 0.5s ease;
}

.theme-btn .sun   { transform: translateY(0); opacity: 1; }
.theme-btn .moon  { transform: translateY(60px); opacity: 0; }
body.light .theme-btn .sun  { transform: translateY(-60px); opacity: 0; }
body.light .theme-btn .moon { transform: translateY(0); opacity: 1; }

/* ===== HERO SECTION ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 0 5%;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  align-items: center;
}

.hero-content { animation: fadeLeft 1s ease-out; }
.hero-image   { animation: fadeRight 1s ease-out; text-align: center; }

h1 {
  font-size: 3.8rem;
  background: linear-gradient(90deg, #00ddeb, #ff6bd6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.desc {
  font-size: 1.2rem;
  opacity: 0.9;
  max-width: 600px;
  line-height: 1.8;
  margin-top: 1rem;
}

.hexagon {
  width: 340px;
  height: 340px;
  position: relative;
  overflow: hidden;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  border: 6px solid transparent;
  background: linear-gradient(45deg,#00ddeb,#ff6bd6) padding-box,
              linear-gradient(45deg,#00ddeb,#ff6bd6) border-box;
  animation: float 6s ease-in-out infinite;
  margin: 0 auto;
}

.hexagon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s;
}

.hero-image:hover .hexagon img { transform: scale(1.08); }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}

/* ===== FILTERS ===== */
.filters {
  padding: 3rem 5%;
  background: rgba(26,26,46,0.5);
  backdrop-filter: blur(12px);
  text-align: center;
}

.filter-btns {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  max-width: 900px;
  margin: 0 auto;
}

.filter-btn {
  padding: 0.8rem 2rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(0,221,235,0.3);
  border-radius: 50px;
  color: #e0e0ff;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.4s;
}

.filter-btn:hover,
.filter-btn.active {
  background: #00ddeb;
  color: #fff;
  box-shadow: 0 8px 25px rgba(0,221,235,0.4);
  transform: translateY(-3px);
}

/* ===== PROJECTS GRID ===== */
.projects {
  padding: 6rem 5%;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2.5rem;
}

.card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(0,221,235,0.2);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.6s ease;
  opacity: 0;
  transform: translateY(40px);
}

.card.visible {
  opacity: 1;
  transform: translateY(0);
}

.card:hover {
  background: rgba(0,221,235,0.12);
  transform: translateY(-15px);
  box-shadow: 0 25px 50px rgba(0,221,235,0.3);
}

.img-wrapper {
  position: relative;
  overflow: hidden;
  cursor: zoom-in;
}

.project-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.img-wrapper:hover .project-img {
  transform: scale(1.12);
}

.card-body {
  padding: 2rem;
}

.card-body h3 {
  color: #ff6bd6;
  font-size: 1.4rem;
  margin-bottom: 0.6rem;
}

.card-body p {
  opacity: 0.9;
  line-height: 1.7;
  margin-bottom: 1rem;
  font-size: 0.98rem;
}

.tech {
  font-size: 0.95rem;
  color: #00ddeb;
  margin: 1rem 0;
}

.btns {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.btn {
  flex: 1;
  padding: 0.9rem 1rem;
  text-align: center;
  border-radius: 50px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s;
}

.btn.primary {
  background: linear-gradient(45deg, #00ddeb, #ff6bd6);
  color: #fff;
}

.btn.outline {
  border: 1px solid #00ddeb;
  color: #00ddeb;
  background: transparent;
}

.btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0,221,235,0.3);
}

/* ===== LIGHTBOX MODAL ===== */
.lightbox {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(10,10,26,0.97);
  backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
}

.lightbox.visible {
  opacity: 1;
  visibility: visible;
}

.lightbox-content {
  position: relative;
  text-align: center;
}

#lightbox-img {
  max-width: 90%;
  max-height: 90vh;
  border-radius: 16px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.7);
}

.lightbox .close {
  position: absolute;
  top: 30px;
  right: 40px;
  font-size: 3rem;
  color: #e0e0ff;
  cursor: pointer;
  transition: color 0.3s;
}

.lightbox .close:hover {
  color: #00ddeb;
}

/* ===== FOOTER (Identical to all pages) ===== */
.footer {
  padding: 4rem 5% 2rem;
  background: rgba(10,10,26,0.95);
  border-top: 1px solid rgba(0,221,235,0.2);
  backdrop-filter: blur(12px);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  width: 300px; height: 1px;
  background: linear-gradient(90deg, transparent, #00ddeb, transparent);
  transform: translateX(-50%);
  animation: footerGlow 4s infinite ease-in-out;
}

@keyframes footerGlow {
  0%, 100% { opacity: 0.4; }
  50%      { opacity: 1; }
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.copyright {
  font-size: 1rem;
  opacity: 0.9;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.copyright strong,
.kh {
  background: linear-gradient(90deg, #00ddeb, #00ffaa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.kh {
  background: linear-gradient(90deg, #ff6bd6, #ff8c42);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
  font-style: italic;
}

.time {
  font-size: 0.9rem;
  opacity: 0.7;
  margin-bottom: 1.5rem;
  font-family: 'Courier New', monospace;
  letter-spacing: 0.5px;
}

.time strong { color: #00ddeb; font-weight: 600; }

.social {
  display: flex;
  justify-content: center;
  gap: 1.8rem;
  margin-top: 1.5rem;
}

.social-link {
  width: 50px; height: 50px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(0,221,235,0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.social-link::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 0; height: 0;
  background: radial-gradient(circle, #00ddeb, transparent);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
  z-index: 0;
}

.social-link:hover::before { width: 200px; height: 200px; }

.social-link .icon {
  width: 24px; height: 24px;
  filter: brightness(0) invert(1);
  transition: all 0.4s ease;
  position: relative;
  z-index: 1;
}

.social-link:hover .icon {
  filter: brightness(0) invert(0);
  transform: scale(1.2) rotate(15deg);
}

.social-link:hover {
  border-color: #00ddeb;
  box-shadow: 0 0 25px rgba(0,221,235,0.5);
  transform: translateY(-5px);
}

/* Light Mode Footer */
body.light .footer {
  background: rgba(248,250,255,0.95);
  border-top: 1px solid rgba(0,221,235,0.15);
}

body.light .social-link {
  background: rgba(0,0,0,0.05);
  border: 1px solid rgba(0,221,235,0.2);
}

body.light .social-link .icon { filter: brightness(0) invert(0); }
body.light .social-link:hover .icon { filter: brightness(0) invert(1); }

/* ===== ANIMATIONS ===== */
@keyframes fadeLeft {
  from { opacity: 0; transform: translateX(-60px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes fadeRight {
  from { opacity: 0; transform: translateX(60px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-image { order: -1; margin-bottom: 2rem; }
  .hexagon { width: 280px; height: 280px; }
  h1 { font-size: 3rem; }
}

@media (max-width: 600px) {
  h1 { font-size: 2.5rem; }
  .hexagon { width: 220px; height: 220px; }
  .filter-btn { padding: 0.7rem 1.5rem; font-size: 0.9rem; }
  .card-body { padding: 1.5rem; }
}