/* --- ROVIDEV STUDIO: ULTRA-MODERN THEME --- */

/* 1. VARIABLES & RESET */
:root {
  --bg-dark: #0b1220;
  --text-main: #e2e8f0;
  --text-muted: #94a3b8;
  --primary: #4661e6;
  --neon-blue: #00f3ff;
  --neon-purple: #bc13fe;

  --glass-bg: rgba(15, 23, 42, 0.65);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-blur: 16px;

  --font-main: 'Inter', system-ui, sans-serif;
  --font-display: 'Space Grotesk', monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  cursor: none;
  /* Hide default cursor */
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-main);
  line-height: 1.6;
  overflow-x: hidden;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* SYSTEM BOOT SCREEN */
#boot-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #050505;
  z-index: 10000;
  display: flex;
  justify-content: start;
  align-items: end;
  /* Bottom-left terminal style */
  padding: 40px;
  font-family: 'Space Mono', 'Fira Code', monospace;
  transition: transform 0.6s cubic-bezier(0.8, 0, 0.2, 1);
}

#boot-screen.loaded {
  transform: translateY(-100%);
}

.boot-container {
  color: #e2e8f0;
  font-size: 14px;
  line-height: 1.5;
  text-transform: uppercase;
}

.log-line {
  display: block;
  margin-bottom: 4px;
}

.log-line.accent {
  color: var(--neon-blue);
}

.cursor-blink {
  color: var(--neon-blue);
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* SOUND TOGGLE */
#sound-toggle {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 999;
  width: 50px;
  height: 50px;
  padding: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  cursor: none;
  /* Handled by JS */
}

/* CUSTOM CURSOR: PRECISION STYLE */
.cursor-dot {
  width: 6px;
  height: 6px;
  background-color: white;
  /* Sharp White */
  position: fixed;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  z-index: 9999;
  pointer-events: none;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

.cursor-outline {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  /* Thin elegant ring */
  position: fixed;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  z-index: 9998;
  pointer-events: none;
  transition: width 0.15s, height 0.15s, border-color 0.2s, background-color 0.2s;
}

body:hover .cursor-outline {
  opacity: 1;
}

h1,
h2,
h3,
.brand-text,
.btn,
.badge,
.stat-number,
.nav-inner {
  font-family: var(--font-display);
}

a {
  text-decoration: none;
  color: inherit;
  transition: 0.3s;
}

ul {
  list-style: none;
}

/* 2. AURORA BACKGROUND ANIMATION */
.aurora-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
  background: #060910;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  animation: float 14s infinite ease-in-out;
}

.blob-1 {
  width: 500px;
  height: 500px;
  background: var(--neon-purple);
  top: -10%;
  left: -10%;
}

.blob-2 {
  width: 400px;
  height: 400px;
  background: var(--neon-blue);
  bottom: 10%;
  right: -5%;
  animation-delay: -5s;
}

.blob-3 {
  width: 300px;
  height: 300px;
  background: var(--primary);
  top: 40%;
  left: 30%;
  animation-duration: 20s;
  opacity: 0.3;
}

@keyframes float {
  0% {
    transform: translate(0, 0) scale(1);
  }

  33% {
    transform: translate(50px, -50px) scale(1.1);
  }

  66% {
    transform: translate(-30px, 20px) scale(0.9);
  }

  100% {
    transform: translate(0, 0) scale(1);
  }
}

/* 3. LAYOUT & TYPOGRAPHY */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.h1 {
  font-size: 3.5rem;
  line-height: 1.1;
  font-weight: 700;
  margin-bottom: 24px;
}

.lead {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 600px;
  margin-bottom: 32px;
}

.text-gradient {
  background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* 4. GLASSMORPHISM COMPONENTS */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
}

/* Navbar */
nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  /* Increased to stay above overlay */
  border-bottom: 1px solid var(--glass-border);
}

.nav-inner {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.2rem;
  cursor: none;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--neon-purple));
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: white;
}

.menu {
  display: flex;
  gap: 32px;
  align-items: center;
}

/* FIX: Ensure Menu Toggle is HIDDEN by default on desktop */
.menu-toggle {
  display: none !important;
}

.menu a:hover {
  color: var(--neon-blue);
}

/* Buttons */
.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 12px 28px;
  border-radius: 99px;
  font-weight: 600;
  cursor: none;
  /* Handled by JS magnetic */
  border: none;
}

.btn.primary {
  background: var(--primary);
  color: white;
  position: relative;
  overflow: hidden;
}

.btn.glow {
  box-shadow: 0 0 20px rgba(70, 97, 230, 0.5);
}

.btn.glow:hover {
  box-shadow: 0 0 40px rgba(70, 97, 230, 0.8);
}

.btn.ghost {
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--text-main);
}

.btn.ghost:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: white;
}

.btn.small {
  padding: 6px 16px;
  font-size: 0.9rem;
}

/* 5. SECTIONS */
.section {
  padding: 100px 0;
}

.section-header {
  margin-bottom: 60px;
  text-align: center;
}

.section-header h2 {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

/* Hero */
.hero-section {
  min-height: 100vh;
  padding-top: 140px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
  gap: 60px;
}

.hero-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 20px;
  background: rgba(70, 97, 230, 0.2);
  color: var(--neon-blue);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 24px;
  border: 1px solid rgba(70, 97, 230, 0.3);
}

.hero-visual {
  perspective: 1000px;
}

.code-window {
  border-radius: 12px;
  transform: rotateY(-10deg) rotateX(5deg);
  transition: transform 0.5s ease;
}

.code-window:hover {
  transform: rotateY(0) rotateX(0) scale(1.02);
}

.window-header {
  padding: 12px;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--glass-border);
}

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

.dot.red {
  background: #ff5f56;
}

.dot.yellow {
  background: #ffbd2e;
}

.dot.green {
  background: #27c93f;
}

.filename {
  margin-left: auto;
  font-size: 0.8rem;
  color: #666;
}

.code-content {
  padding: 20px;
  font-family: 'Fira Code', monospace;
  font-size: 0.9rem;
  color: #d19a66;
}

.code-content pre {
  color: #abb2bf;
}

.k {
  color: #c678dd;
}

.v {
  color: #e06c75;
}

.f {
  color: #61afef;
}

.s {
  color: #98c379;
}

.c {
  color: #5c6370;
}

/* 6. BENTO GRID */
.bento-grid {
  display: grid;
  gap: 24px;
}

/* Utilities added for V2 */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.small-card {
  padding: 20px;
  align-items: center;
  text-align: center;
}

.icon-small {
  font-size: 1.8rem;
  margin-bottom: 8px;
}

.text-xs {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.tech-stack-mini {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.9rem;
  color: var(--text-muted);
  font-family: var(--font-display);
  opacity: 0.8;
}

.services-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.portfolio-grid {
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: minmax(180px, auto);
}

.bento-card {
  padding: 32px;
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.bento-card:hover {
  transform: translateY(-8px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
}

.featured-project {
  grid-column: span 2;
  background: linear-gradient(to right, rgba(15, 23, 42, 0.8), rgba(15, 23, 42, 0.4)), url('https://placehold.co/800x400/1e293b/475569?text=GlobalKeyMarket');
  /* Placeholder till user screenshot */
  background-size: cover;
  position: relative;
}

.featured-project .project-content {
  z-index: 2;
}

.badge-tech {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--neon-blue);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.tech-tags {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.tech-tags li {
  background: rgba(255, 255, 255, 0.05);
  padding: 4px 10px;
  border-radius: 4px;
}

/* Icons & Stats */
.icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.stat-card {
  align-items: center;
  justify-content: center;
  text-align: center;
}

.stat-number {
  font-size: 3.5rem;
  color: white;
  display: block;
  margin-bottom: 8px;
}

/* 7. MARQUEE */
.tech-marquee-container {
  overflow: hidden;
  white-space: nowrap;
  padding: 30px 0;
  border-top: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.2);
}

.tech-marquee-track {
  display: inline-block;
  animation: scroll 30s linear infinite;
}

.tech-marquee-track span {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: rgba(255, 255, 255, 0.3);
  margin: 0 40px;
  font-weight: 700;
}

@keyframes scroll {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

/* 8. CONTACT & FOOTER */
.contact-box {
  padding: 60px;
}

input,
textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--glass-border);
  padding: 16px;
  color: white;
  border-radius: 8px;
  margin-bottom: 16px;
  font-family: var(--font-main);
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
}

/* Form Status Messages */
.form-status {
  margin-top: 16px;
  padding: 12px;
  border-radius: 8px;
  font-size: 0.9rem;
  text-align: center;
  animation: slideIn 0.3s ease;
}

.form-status.success {
  background: rgba(40, 167, 69, 0.2);
  border: 1px solid rgba(40, 167, 69, 0.5);
  color: #28a745;
}

.form-status.error {
  background: rgba(220, 53, 69, 0.2);
  border: 1px solid rgba(220, 53, 69, 0.5);
  color: #dc3545;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

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

footer {
  padding: 40px 0;
  text-align: center;
  border-top: 1px solid var(--glass-border);
  margin-top: 80px;
  color: var(--text-muted);
}

/* 9. SCROLL REVEAL CLASS */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.delay-1 {
  transition-delay: 0.1s;
}

.delay-2 {
  transition-delay: 0.2s;
}

.delay-3 {
  transition-delay: 0.3s;
}

/* Overlay (Hidden by default, used for Mobile) */
.menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  /* Darker, NO BLUR */
  z-index: 990;
  /* Below Nav(1000) but above content */
  /* backdrop-filter: blur(4px); REMOVED to prevent artifacts */
}

.menu-overlay.active {
  display: block;
}

/* RESPONSIVE */
@media (max-width: 900px) {
  * {
    cursor: auto !important;
  }

  .section {
    padding: 60px 0;
  }

  /* Reduced padding for mobile */

  .hero-section {
    grid-template-columns: 1fr;
    padding-top: 100px;
    text-align: center;
  }

  .h1 {
    font-size: 2.5rem;
  }

  .hero-actions {
    justify-content: center;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .featured-project {
    grid-column: span 1;
  }

  /* Fix Grid-2 on Mobile (Stack columns) */
  .grid-2 {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  /* Fix Contact Box Padding */
  .contact-box {
    padding: 24px;
  }

  /* Mobile Menu Container */
  .menu {
    display: flex;
    /* Always flex, hide via transform */
    flex-direction: column;
    position: fixed;
    top: 0;
    right: 0;
    width: 85%;
    max-width: 300px;
    height: 100vh;
    background: rgba(11, 18, 32, 0.95);
    /* High opacity for legibility */
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    padding: 100px 32px;
    z-index: 200;
    align-items: flex-start;
    gap: 32px;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.8);

    /* Animation State: Hidden */
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s linear 0.4s;
  }

  /* Active State: Visible */
  .menu.active {
    transform: translateX(0);
    visibility: visible;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s;
  }

  /* Show toggle on mobile, override the !important global */
  .menu-toggle {
    display: inline-flex !important;
    z-index: 201;
  }

  .code-window {
    display: none;
  }

  .cursor-dot,
  .cursor-outline {
    display: none;
  }
}