/* --- BASE STYLES --- */
:root {
  --bg: #0c1116;
  --card: #161b22;
  --text: #e7f4ff;
  --muted: #8b949e;
  --accent: #58a6ff;
  --border: rgba(255, 255, 255, 0.1);
  --accent-2: #7cf2ff;
  --intro-rgb: 124, 242, 255;
  --intro-glow: rgba(var(--intro-rgb), 0.35);
  --radius-md: 16px;
  --max-width: 1200px;
  --chip: rgba(11, 79, 214, 0.04);
  --easing: cubic-bezier(0.23, 1, 0.32, 1);
  --glass: rgba(22, 27, 34, 0.8);
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 32px 64px rgba(0, 0, 0, 0.4);
  --bg-grid: radial-gradient(circle at 18% 12%, rgba(88, 166, 255, 0.12), transparent 46%), radial-gradient(circle at 82% 0%, rgba(124, 242, 255, 0.15), transparent 38%), radial-gradient(circle at 30% 80%, rgba(88, 166, 255, 0.08), transparent 40%);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; font-size: 16px; overflow-x: hidden; }
body {
  margin: 0; min-height: 100vh; background-color: var(--bg); background-image: var(--bg-grid); background-size: 140% 140%; color: var(--text); font-family: "SF Pro Display", sans-serif; -webkit-font-smoothing: antialiased; line-height: 1.5; animation: bgShift 20s ease-in-out infinite; overflow-x: hidden;
}
@keyframes bgShift { 0%, 100% { background-position: 0% 0%; } 50% { background-position: 100% 60%; } }

h1, h2, h3, h4 { letter-spacing: -0.02em; font-weight: 800; line-height: 1.1; }
p { font-size: clamp(1rem, 1rem + 0.25vw, 1.25rem); }

.container { width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

/* INTRO */
.intro { 
  position: fixed; inset: 0; z-index: 10000; background: var(--bg); 
  display: flex; align-items: center; justify-content: center; 
  transition: all 1s cubic-bezier(0.85, 0, 0.15, 1);
  overflow: hidden;
}
.intro.hide { 
  opacity: 0; visibility: hidden; pointer-events: none; 
  transform: scale(1.2);
  filter: blur(20px);
}
.intro-logo { 
  width: clamp(150px, 30vw, 300px); height: auto; 
  filter: drop-shadow(0 0 40px var(--intro-glow));
  animation: logoPulse 2.5s ease-in-out infinite;
  transition: transform 1s var(--easing);
}
@keyframes logoPulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 40px var(--intro-glow)); }
  50% { transform: scale(1.05); filter: drop-shadow(0 0 60px var(--intro-glow)); }
}

/* NAV */
header.nav { position: sticky; top: 0; z-index: 1000; background: var(--glass); backdrop-filter: blur(16px) saturate(180%); border-bottom: 1px solid var(--border); padding: 16px 0; transition: all 0.4s var(--easing); }
header.nav.shrink { padding: 10px 0; box-shadow: var(--shadow-sm); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; position: relative; }
.brand-left { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); }
#headerLogo { width: 48px; height: 48px; border-radius: 12px; transition: all 0.3s var(--easing); border: none; filter: drop-shadow(0 0 0px transparent); }
.brand-left:hover #headerLogo { transform: scale(1.05); }

nav.primary { display: flex; gap: 24px; align-items: center; }
nav.primary a { text-decoration: none; color: var(--muted); font-size: 0.9rem; font-weight: 600; transition: all 0.2s; position: relative; }
nav.primary a:hover { color: var(--accent); }

/* BUTTONS */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 12px 28px; border-radius: 99px; font-weight: 700; cursor: pointer; border: none; transition: all 0.4s var(--easing); text-decoration: none; font-size: 0.95rem; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 8px 20px rgba(11, 79, 214, 0.2); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(11, 79, 214, 0.35); }
.btn-ghost { background: var(--chip); color: var(--accent); border: 1px solid rgba(11, 79, 214, 0.15); }
.btn-ghost:hover { background: rgba(11, 79, 214, 0.08); transform: translateY(-2px); }

/* HERO */
.hero { padding: 100px 0 40px; min-height: 65vh; display: flex; align-items: center; }
.hero-inner { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 80px; align-items: center; }
.hero-title { font-size: clamp(3rem, 8vw, 5rem); margin-bottom: 25px; }
.shuffle-wrap { min-height: 1.2em; display: inline-block; position: relative; }
.shuffle-text { border-right: none; padding-right: 0; animation: none; }
.type-cursor {
  display: inline-block;
  width: 1ch;
  color: var(--accent);
  animation: blink-cursor 1s steps(1) infinite;
}
@keyframes blink-cursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.hero-CTAs { margin-top: 32px; display: flex; gap: 16px; flex-wrap: wrap; }

/* SHOWCASE ANIMATION - MODERN */
.showcase-anim {
  width: 100%;
  max-width: 450px;
  height: auto;
  overflow: visible;
  filter: drop-shadow(0 20px 60px rgba(11, 79, 214, 0.15));
  transition: transform 0.5s var(--easing);
}
.showcase-anim:hover {
  transform: scale(1.02);
}
.anim-core {
  transform-origin: center;
  animation: breathe 8s ease-in-out infinite;
}
.anim-ring-outer {
  transform-origin: center;
  animation: rotateSlow 20s linear infinite;
}
.anim-ring-inner {
  transform-origin: center;
  animation: rotateReverse 15s linear infinite;
}
@keyframes breathe {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.95); opacity: 0.8; }
}
@keyframes rotateSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes rotateReverse {
  from { transform: rotate(360deg); }
  to { transform: rotate(0deg); }
}

/* FAQ - PROXIMITY GLOW GRID */
.faq-section { padding: 100px 0; }
.faq-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 24px; margin-top: 50px; }
.q { background: var(--card); border: 1px solid var(--border); border-radius: 24px; padding: 32px; cursor: pointer; transition: all 0.4s var(--easing); position: relative; overflow: hidden; }
.q::before { content: ""; position: absolute; inset: 0; background: radial-gradient(500px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(11, 79, 214, 0.1), transparent 45%); opacity: 0; transition: opacity 0.5s; pointer-events: none; }
.q:hover::before { opacity: 1; }
.q button { width: 100%; border: none; background: none; text-align: left; font-size: 1.15rem; font-weight: 600; color: var(--text); display: flex; justify-content: space-between; cursor: pointer; padding: 0; position: relative; z-index: 1; }
.q button::after { content: '+'; font-size: 1.5rem; transition: transform 0.3s; color: var(--accent); flex-shrink: 0; }
.q.open button::after { transform: rotate(45deg); }
.answer { max-height: 0; overflow: hidden; transition: all 0.4s var(--easing); color: var(--muted); line-height: 1.6; font-size: 1.05rem; position: relative; z-index: 1; }
.q.open .answer { max-height: 300px; margin-top: 18px; }

/* MODAL */
.modal { position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: all 0.4s var(--easing); padding: 20px; }
.modal.open { opacity: 1; visibility: visible; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(8px); }
.modal-dialog { 
  position: relative; background: var(--card); border-radius: 32px; 
  width: 100%; max-width: 800px; max-height: 90vh; 
  overflow-y: auto; padding: 40px; 
  transform: scale(0.95) translateY(20px); 
  transition: all 0.5s var(--easing);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}
.modal.open .modal-dialog { transform: scale(1) translateY(0); }
.modal-close { position: absolute; top: 20px; right: 20px; border: none; background: none; font-size: 2rem; cursor: pointer; color: var(--muted); z-index: 10; line-height: 1; }

/* FVR SPECIAL THEME */
body.fvr-theme-active {
  --bg: #000000 !important;
  --card: #050505 !important;
  --text: #ff0000 !important;
  --accent: #ff0000 !important;
  --muted: #ff0000 !important;
  --border: rgba(255, 0, 0, 0.4) !important;
  --glass: rgba(0, 0, 0, 0.95) !important;
  background-image: none !important;
}

/* Project Modal Enhancements */
body.fvr-theme-active .project-modal-dialog {
  position: relative;
  z-index: 1;
  border-radius: 32px;
  overflow: hidden; /* Changed to hidden to contain backgrounds */
  border: 1px solid rgba(255,0,0,0.5);
  box-shadow: 0 0 100px rgba(255, 0, 0, 0.2);
  background: #000 !important;
}
body.fvr-theme-active .project-modal-dialog::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(255, 0, 0, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 0, 0, 0.05) 1px, transparent 1px);
  background-size: 50px 50px;
  z-index: -1;
  pointer-events: none;
}
body.fvr-theme-active .project-modal-dialog::after {
  content: "";
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: radial-gradient(circle at center, transparent 0%, #000 90%);
  z-index: -1;
  pointer-events: none;
}

/* Center portfolio items/text when FVR theme is active */
body.fvr-theme-active .projects-grid { justify-items: center; }
body.fvr-theme-active .project-card { text-align: center; margin-left: auto; margin-right: auto; }

body.fvr-theme-active .modal-text-wrap * {
  font-family: 'Stretch Pro', sans-serif !important;
  text-transform: uppercase !important;
  color: #ff0000 !important;
  letter-spacing: 0.05em;
}
body.fvr-theme-active .modal-text-wrap .btn {
  color: #000000 !important;
}
body.fvr-theme-active .modal-text-wrap .btn-ghost {
  border-color: #ff0000 !important;
  background: transparent !important;
  color: #ff0000 !important;
}

.project-modal-dialog { max-width: 1200px; padding: 0; overflow: hidden; }
.project-modal-grid { display: flex; min-height: 700px; background: var(--card); position: relative; }
.modal-img-side { 
  width: 300px; 
  background: #000; 
  position: relative; 
  overflow: hidden; 
  flex-shrink: 0;
  display: none;
}
.modal-img-side img { 
  width: 100%; height: 100%; 
  object-fit: cover;
  display: block;
}
.modal-img-side.active { display: block; }

.modal-text-wrap { flex: 1; padding: 60px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; min-width: 0; position: relative; }

.fvr-gif {
  width: 140px;
  height: 140px;
  margin-bottom: 30px;
  display: none !important;
  filter: drop-shadow(0 0 15px #ff0000);
  object-fit: contain;
}
body.fvr-theme-active .fvr-gif { 
  display: block !important; 
}

@media (max-width: 1023px) {
  .project-modal-grid { flex-direction: column; height: auto; max-height: 90vh; overflow-y: auto; }
  .modal-img-side { width: 100%; height: 300px; }
  .modal-img-side.scrolling img {
    animation: scrollTallMobile 15s linear infinite alternate;
  }
  @keyframes scrollTallMobile {
    0% { transform: translateY(0); }
    100% { transform: translateY(calc(-100% + 300px)); }
  }
}

@media (max-width: 767px) {
  .modal-dialog { padding: 30px 20px; border-radius: 24px; }
  .modal-close { top: 15px; right: 15px; }
  .modal-text-wrap { padding: 40px 24px; }
}

/* SELECTED PROJECTS - REDONE */
.portfolio-section { padding: 100px 0; }
.section-head.centered { text-align: center; margin-bottom: 60px; }
.projects-grid { 
  display: grid; 
  gap: 40px; 
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); 
  justify-content: center;
}
.project-card { 
  background: var(--card); border: 1px solid var(--border); border-radius: 28px; 
  padding: 24px; display: flex; flex-direction: column; gap: 20px; 
  transition: all 0.5s var(--easing); cursor: pointer; position: relative; overflow: hidden;
  max-width: 450px; margin: 0 auto;
}
.project-card:hover { transform: translateY(-10px); border-color: var(--accent); box-shadow: var(--shadow-lg); }
.project-thumb { width: 100%; aspect-ratio: 16/10; border-radius: 18px; overflow: hidden; }
.project-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--easing); }
.project-card:hover .project-thumb img { transform: scale(1.05); }
.project-info h3 { font-size: 1.6rem; margin: 0; }
.tags { display: flex; gap: 10px; flex-wrap: wrap; }
.tag { background: var(--chip); color: var(--accent); padding: 6px 14px; border-radius: 99px; font-size: 0.85rem; font-weight: 700; }

/* CONTACT CARD - REDONE */
.contact-section { padding: 120px 0; }
.contact-card.big { 
  max-width: 850px; margin: 0 auto; 
  background: var(--card); border: 1px solid var(--border); border-radius: 40px; 
  padding: 80px 40px; text-align: center; position: relative; overflow: hidden;
  box-shadow: var(--shadow-lg);
  opacity: 0; transform: translateY(40px); transition: all 1s var(--easing);
}
.contact-card.big.show { opacity: 1; transform: translateY(0); }
.contact-card.big::before {
  content: ""; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
  background: radial-gradient(circle at center, rgba(11, 79, 214, 0.04) 0%, transparent 70%);
  pointer-events: none;
}
.contact-card.big h2 { font-size: clamp(2.5rem, 5vw, 3.5rem); margin-bottom: 20px; }
.contact-email { display: inline-flex; align-items: center; gap: 15px; margin: 40px 0; font-size: clamp(1.5rem, 4vw, 2.5rem); text-decoration: none; color: var(--accent); font-weight: 800; transition: transform 0.3s; }
.contact-email:hover { transform: scale(1.02); }

/* FOOTER - FIXED */
footer { padding: 80px 0 40px; background: var(--bg); border-top: 1px solid var(--border); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
.footer-col h4 { margin-bottom: 25px; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text); opacity: 0.8; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 12px; }
.footer-links a { text-decoration: none; color: var(--muted); font-size: 1rem; transition: color 0.2s; }
.footer-links a:hover { color: var(--accent); }
.footer-bottom { margin-top: 60px; padding-top: 30px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 0.9rem; }

/* ... (MODAL remains the same) ... */

/* MOBILE NAVIGATION */
.hamburger {
  display: none;
  width: 40px;
  height: 40px;
  position: relative;
  border: none;
  background: transparent;
  cursor: pointer;
  z-index: 3000;
  padding: 0;
}
.hamburger span {
  display: block;
  position: absolute;
  height: 2px;
  width: 24px;
  background: var(--text);
  border-radius: 9px;
  opacity: 1;
  left: 8px;
  transform: rotate(0deg);
  transition: .25s var(--easing);
}
.hamburger span:nth-child(1) { top: 12px; }
.hamburger span:nth-child(2) { top: 19px; }
.hamburger span:nth-child(3) { top: 26px; }

.hamburger.is-open span:nth-child(1) { top: 19px; transform: rotate(135deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; left: -40px; }
.hamburger.is-open span:nth-child(3) { top: 19px; transform: rotate(-135deg); }

.mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--glass);
  backdrop-filter: blur(20px) saturate(200%);
  -webkit-backdrop-filter: blur(20px) saturate(200%);
  z-index: 2500;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 30px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.5s var(--easing);
}
.mobile-menu.is-open {
  opacity: 1;
  visibility: visible;
}
.mobile-menu a {
  font-size: 2rem;
  font-weight: 800;
  text-decoration: none;
  color: var(--text);
  transform: translateY(20px);
  transition: all 0.4s var(--easing);
  opacity: 0;
}
.mobile-menu.is-open a {
  transform: translateY(0);
  opacity: 1;
}
.mobile-menu.is-open a:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu.is-open a:nth-child(2) { transition-delay: 0.2s; }
.mobile-menu.is-open a:nth-child(3) { transition-delay: 0.3s; }
.mobile-menu.is-open a:nth-child(4) { transition-delay: 0.4s; }
.mobile-menu.is-open a:nth-child(5) { transition-delay: 0.5s; }

.view-more-container {
  display: none;
  justify-content: center;
  margin-top: 30px;
}

@media (max-width: 1023px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-col:first-child { grid-column: span 2; }
}
@media (max-width: 767px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero { padding: 60px 0 30px; }
  .portfolio-section, .contact-section, .faq-section, #services, #pricing { padding: 50px 0 !important; }
  
  .hero-CTAs {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
    margin-top: 30px;
  }
  .hero-CTAs .btn { width: 100%; margin: 0; }
  
  .contact-CTAs {
    flex-direction: column;
    gap: 16px !important;
    align-items: stretch;
  }
  .contact-CTAs .btn { width: 100%; padding: 18px 30px !important; }

  footer { padding: 40px 0 30px; }
  .footer-grid { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    text-align: center; 
    gap: 30px; 
  }
  .footer-col { width: 100%; }
  .footer-col:first-child { margin-bottom: 0; }
  .footer-col h4 { margin-bottom: 15px; font-size: 0.8rem; }
  .footer-links li { margin-bottom: 8px; }
  .footer-bottom { 
    margin-top: 40px; 
    padding-top: 20px; 
    flex-direction: column; 
    gap: 15px; 
    text-align: center; 
  }
  
  nav.primary, .brand-center { display: none; }
  .hamburger { display: block; }
  
  .faq-section .section-head { text-align: center; }
  .faq-grid { grid-template-columns: 1fr; }
  .view-more-container {
    display: none;
  }
}

[data-reveal] { opacity: 0; transform: translateY(30px); transition: all 0.8s var(--easing); }
[data-reveal].show { opacity: 1; transform: translateY(0); }

/* --- STYLES END --- */