/* =======================
   Global
======================= */
body {
  margin: 0;
  font-family: 'Poppins', 'Helvetica Neue', Arial, sans-serif;
  font-size: 18px;
  line-height: 1.8;
  color: #fff;
  background: url('https://ciprianchioveanu.com/wp-content/uploads/2025/10/background_extended-scaled.jpg') no-repeat center top fixed;
  background-size: cover;
  background-color: #000;
  cursor: url('https://ciprianchioveanu.com/wp-content/uploads/2025/10/7d85b8f9be8acdcc87dedf95af096497.png') 16 16, auto;
}

html, body {
  overflow-x: hidden !important;
}

a { text-decoration: none; color: inherit; }

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

/* =======================
   Header
======================= */
.site-header {
  background: transparent;
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  padding: 1rem 3rem;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-sizing: border-box;
}

/* Navigation */
.nav {
  list-style: none;
  display: flex;
  gap: 2rem;
  margin: 0;
  padding: 0;
}
.nav a {
  font-size: 1rem;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.6);
  transition: color 0.3s ease, text-shadow 0.3s ease;
}
.nav a:hover { 
  color: #fff; 
  text-shadow: 0 0 6px #fff, 0 0 12px #fff; 
}

/* =======================
   Logo (angled B/W animation)
======================= */
.site-logo,
.logo-text {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;

  background: linear-gradient(
    45deg,
    #000 0%,
    #fff 25%,
    #000 50%,
    #fff 75%,
    #000 100%
  );
  background-size: 400% 400%;

  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientShift 6s ease infinite;
  text-decoration: none;
}

@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  25%  { background-position: 100% 0%; }
  50%  { background-position: 50% 100%; }
  75%  { background-position: 0% 0%; }
  100% { background-position: 0% 50%; }
}

/* =======================
   Hero
======================= */
.hero {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: #fff;
}
.hero h1 {
  font-size: 3.2rem;
  font-weight: 600;
  margin-bottom: 1rem;
}
.hero p {
  font-size: 1.3rem;
  opacity: 0.85;
}

/* Hero Tags */
.hero-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin-top: 1.5rem;
}
.hero-tags span {
  font-family: 'Orbitron', sans-serif;
  font-size: 2.4rem;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  transition: all 0.4s ease;
  text-align: center;
  white-space: normal;
}

/* Matrix hover effect */
.hero-tags span:hover {
  color: #00ff41;
  text-shadow:
    0 0 5px #00ff41,
    0 0 10px #00ff41,
    0 0 20px #00ff41,
    0 0 40px #00ff41;
  animation: matrix-flicker 0.15s infinite alternate;
}
@keyframes matrix-flicker {
  from {
    opacity: 1;
    text-shadow:
      0 0 5px #00ff41,
      0 0 15px #00ff41,
      0 0 30px #00ff41;
  }
  to {
    opacity: 0.85;
    text-shadow:
      0 0 2px #00ff41,
      0 0 8px #00ff41,
      0 0 20px #00ff41;
  }
}

/* =======================
   Sections
======================= */
section {
  min-height: 100vh;
  padding: 6rem 2rem;
  scroll-snap-align: start;
  background: transparent;
}
section h2 {
  margin-bottom: 3rem;
  text-align: center;
  font-size: 2.4rem;
}

/* =======================
   Portfolio Grid
======================= */
.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}
.work-card {
  position: relative;
  background: url('https://ciprianchioveanu.com/wp-content/uploads/2025/10/resource-database-QQme1fclop0-unsplash-1-scaled.jpg') center/cover no-repeat;
  border-radius: 12px;
  overflow: hidden;
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 2.5s ease, transform 2.5s ease, box-shadow .4s ease;
  color: #000 !important;
  font-weight: 700;
}
.work-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.7);
  border-radius: 12px;
  z-index: -1;
}
.work-card.visible { opacity: 1; transform: translateY(0); }
.work-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.6);
}
.work-meta { padding: 1rem; text-align: center; }

/* =======================
   Services
======================= */
.service-items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}
.service-item {
  position: relative;
  display: block;
  background: url('https://ciprianchioveanu.com/wp-content/uploads/2025/10/resource-database-QQme1fclop0-unsplash-1-scaled.jpg') center/cover no-repeat;
  padding: 2rem;
  border-radius: 12px;
  text-align: center;
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 2.5s ease, transform 2.5s ease, box-shadow .3s ease;
  color: #000 !important;
  font-weight: 700;
}
.service-item::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.7);
  border-radius: 12px;
  z-index: -1;
}
.service-item.visible { opacity: 1; transform: translateY(0); }
.service-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.5);
}

/* =======================
   Contact (same hover as services)
======================= */
#contact .service-item {
  font-weight: 700;
  color: #000 !important;
}
#contact .service-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.5);
}

/* =======================
   Content Containers
======================= */
.text-box {
  position: relative;
  background: url('https://ciprianchioveanu.com/wp-content/uploads/2025/10/resource-database-QQme1fclop0-unsplash-1-scaled.jpg') center/cover no-repeat;
  padding: 2rem 3rem;
  border-radius: 12px;
  max-width: 800px;
  margin: 0 auto;
  box-shadow: 0 8px 16px rgba(0,0,0,0.5);
  text-align: center;
  color: #000;
  font-weight: 700;
  z-index: 1;
}
.text-box::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.7);
  border-radius: 12px;
  z-index: -1;
}

/* =======================
   Force text black
======================= */
.work-card *, .service-item *, .text-box * {
  position: relative;
  z-index: 1;
  color: #000 !important;
  font-weight: 700;
}

/* =======================
   Background Overlay
======================= */
body::before {
  content: "";
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.35);
  z-index: -1;
  pointer-events: none;
}

/* =======================
   Cursor Glow
======================= */
#cursor-glow {
  position: fixed;
  top: 0; left: 0;
  width: 32px;
  height: 32px;
  background: url('https://ciprianchioveanu.com/wp-content/uploads/2025/10/7d85b8f9be8acdcc87dedf95af096497.png') no-repeat center center;
  background-size: contain;
  pointer-events: none;
  filter: drop-shadow(0 0 6px #fff) drop-shadow(0 0 12px #fff);
  z-index: 9999;
}

/* =======================
   Footer
======================= */
.site-footer {
  text-align: center;
  padding: 2rem;
  background: #111;
  color: #fff;
  font-size: 0.9rem;
}

/* =======================
   Fade Animations
======================= */
.fade-anim {
  opacity: 0;
  transform: translateY(60px);
  transition: opacity 2.5s ease, transform 2.5s ease;
}
.fade-anim.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =======================
   Mobile Fixes
======================= */
@media (max-width: 768px) {
  section {
    padding: 4rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .container { width: 100%; text-align: center; }

  .service-items, .works-grid {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .service-item, .work-card, .text-box {
    margin: 0 auto;
    text-align: center;
  }

  .text-box {
    max-width: 95% !important;
    padding: 1.5rem !important;
    box-sizing: border-box;
  }

  /* Mobile navigation dimmed until hover/tap */
  .nav {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
  }
  .nav a {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.5);
    transition: color 0.3s ease, text-shadow 0.3s ease;
  }
  .nav a:hover,
  .nav a:focus,
  .nav a:active {
    color: #fff;
    text-shadow: 0 0 6px #fff, 0 0 12px #fff;
  }

  .hero-tags {
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 2rem;
    width: 100%;
  }
  .hero-tags span {
    font-size: 1.4rem !important;
    line-height: 1.4;
    text-align: center;
    white-space: normal;
  }
}

/* Smooth scrolling for anchor links */
html {
  scroll-behavior: smooth;
}



/* =======================
   Clickable About Box
======================= */
.about-link {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.about-link:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}


/* =======================
   Page Header Offset (for inner pages)
======================= */
body.page:not(.home) section:first-of-type {
  padding-top: 140px; /* adjust if menu is taller */
}


/* =======================
   Align content under fixed header
   ======================= */
body.page,
body.single,
section {
  padding-top: 140px !important; /* pushes content below logo/menu */
}

/* Reduce slightly on smaller screens */
@media (max-width: 768px) {
  body.page,
  body.single,
  section {
    padding-top: 120px !important;
  }
}

/* Specifically fix About section box overlap */
#about .text-box {
  margin-top: 40px !important;
}

/* Make sure the hero and top CTA sections don’t overlap logo */
.hero,
#portfolio,
#services,
#contact {
  margin-top: 100px !important;
}


/* =======================
   FRONT PAGE CTA FIX (ONLY internal sections)
======================= */

/* Apply only to sections within front page layout */
body.home section {
  padding-top: 9rem !important; /* moves them down */
}

/* Fine-tune About, Services, Contact boxes */
body.home #about .text-box,
body.home #services .service-items,
body.home #contact .service-items {
  margin-top: 2rem !important; /* gentle spacing below logo */
}

/* Keep hero banner unaffected */
body.home .hero {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

/* Mobile fine-tuning */
@media (max-width: 768px) {
  body.home section {
    padding-top: 7rem !important;
  }
  body.home #about .text-box,
  body.home #services .service-items,
  body.home #contact .service-items {
    margin-top: 1.5rem !important;
  }
}


/* =======================
   HERO CTA FIX (Homepage Only)
   ======================= */
body.home #hero {
  display: flex;
  justify-content: center;
  align-items: flex-start !important;
  padding-top: 180px !important; /* Adjust this number if still too high/low */
  box-sizing: border-box;
}

body.home .hero-tags {
  margin-top: 2rem !important;
}


/* ===========================
   HOME PAGE HERO SPACING FIX
   =========================== */

body.home #hero {
  display: flex !important;
  justify-content: flex-start !important;
  align-items: flex-start !important;
  padding-top: 280px !important; /* Moves CTA container below logo/menu */
  min-height: 100vh !important;
}

/* For smaller devices */
@media (max-width: 768px) {
  body.home #hero {
    padding-top: 350px !important; /* More top space on mobile */
  }
}

body.home .hero-tags {
  margin-top: 2rem !important;
  text-align: center;
  transform: translateY(0) !important;
}


/* ===== Smooth Scroll Offset Fix ===== */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px; /* adjust based on header height */
}

/* Optional: adjust for mobile if header is taller */
@media (max-width: 768px) {
  html {
    scroll-padding-top: 120px; /* adjust as needed for mobile header size */
  }
}

/* Center align the portfolio title again */
#portfolio h1,
#portfolio h2,
.portfolio-section h1,
.portfolio-section h2 {
  text-align: center !important;
  width: 100%;
  margin: 0 auto !important;
  display: block;
}
