/* css/style.css - Global Styles, Theme Variables & Responsive System */

/* ==========================================================================
   1. CSS VARIABLES (DARK MODE - PROFESSIONAL BLUE THEME)
   ========================================================================== */
:root {
  --bg-color: #0b0f19;          /* ভেরি ডার্ক নেভি ব্যাকগ্রাউন্ড (চোখের জন্য আরামদায়ক) */
  --card-bg: rgba(30, 41, 59, 0.5); /* প্রিমিয়াম গ্লাস ইফেক্ট */
  --card-border: rgba(59, 130, 246, 0.15); /* সফট নীলচে বর্ডার */
  --card-hover-border: rgba(59, 130, 246, 0.6); /* হোভার করলে ইলেকট্রিক ব্লু */
  
  --input-bg: rgba(15, 23, 42, 0.6);
  
  --text-main: #f1f5f9;          /* ক্রিস্প হোয়াইট/সাদাটে গ্রে */
  --text-muted: #94a3b8;         /* মিউটেড গ্রে-ব্লু টেক্সট */
  --accent-color: #3b82f6;       /* প্রফেশনাল ইলেকট্রিক ব্লু */
  --accent-glow: rgba(59, 130, 246, 0.25); /* সফট গ্লো ইফেক্ট */
  
  --nav-bg: rgba(11, 15, 25, 0.75);
  --nav-mobile-bg: rgba(11, 15, 25, 0.95);
  
  --font-main: 'Plus Jakarta Sans', sans-serif;
  --font-mono: 'Fira Code', monospace;
  
  --transition-fast: 0.2s ease;
  --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   2. CSS VARIABLES (LIGHT MODE OVERRIDES)
   ========================================================================== */
body.light-theme {
  --bg-color: #f8fafc;
  --card-bg: rgba(255, 255, 255, 0.9);
  --card-border: #cbd5e1;
  --card-hover-border: #2563eb;
  
  --input-bg: #ffffff;
  
  --text-main: #0f172a;
  --text-muted: #64748b;
  --accent-color: #2563eb;
  --accent-glow: rgba(37, 99, 235, 0.15);
  
  --nav-bg: rgba(248, 250, 252, 0.85);
  --nav-mobile-bg: rgba(248, 250, 252, 0.95);
}

body.light-theme .glass-card {
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

/* ==========================================================================
   SCI-FI LOADING SCREEN STYLES
   ========================================================================== */
#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #0b0f19;
  z-index: 99999;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: var(--font-mono);
  color: var(--accent-color);
  overflow: hidden;
}

.loading-content {
  text-align: center;
  width: 80%;
  max-width: 500px;
  position: relative;
}

.matrix-bg {
  position: absolute;
  top: -500px;
  left: 0;
  width: 100%;
  height: 1500px;
  background: repeating-linear-gradient(
    180deg,
    rgba(59, 130, 246, 0.03) 0px,
    rgba(0, 0, 0, 0) 4px,
    rgba(59, 130, 246, 0.05) 1px
  );
  animation: matrixRain 20s linear infinite;
  opacity: 0.4;
}

@keyframes matrixRain {
  0% { transform: translateY(0); }
  100% { transform: translateY(500px); }
}

.terminal-loader {
  text-align: left;
  margin-bottom: 20px;
  font-size: 14px;
  text-shadow: 0 0 8px var(--accent-glow);
}

.terminal-loader p {
  margin: 5px 0;
  opacity: 0;
  animation: fadeInLog 0.5s forwards;
}

.terminal-loader .prefix { animation-delay: 0.2s; }
.terminal-loader .log { animation-delay: 0.8s; }
.terminal-loader .log:nth-child(3) { animation-delay: 1.5s; }
.terminal-loader .blinker { animation-delay: 2.2s; }

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

.blinker::after {
  content: '_';
  animation: blink 1s infinite;
}

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

.loader-bar {
  width: 100%;
  height: 4px;
  background-color: #1e293b;
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 10px;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.2);
}

.loader-bar .progress {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #1d4ed8, #3b82f6);
  box-shadow: 0 0 15px var(--accent-color);
  animation: loadProgress 3.5s ease-in-out forwards;
}

@keyframes loadProgress {
  0% { width: 0%; }
  40% { width: 45%; }
  70% { width: 70%; }
  100% { width: 100%; }
}

.brand-text {
  font-size: 18px;
  font-weight: bold;
  letter-spacing: 4px;
  color: #94a3b8;
  animation: textPulse 2s infinite;
}

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

/* ==========================================================================
   3. BASE RESET & GENERAL LAYOUT
   ========================================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-family: var(--font-main);
  background-color: var(--bg-color);
  color: var(--text-main);
  transition: background-color 0.3s ease, color 0.3s ease;
}

body {
  overflow-x: hidden;
  line-height: 1.6;
  background-color: var(--bg-color);
  color: var(--text-main);
  position: relative;
  z-index: 0;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 2;
}

/* Background Grid Lines */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
  z-index: -3;
}

body.light-theme::before {
  background-image: 
    linear-gradient(to right, rgba(0, 0, 0, 0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.06) 1px, transparent 1px);
}

.bg-blob {
  position: fixed;
  width: 450px;
  height: 450px;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.45;
  pointer-events: none;
  z-index: -2;
  animation: floatOrb 10s infinite alternate ease-in-out;
}

body.light-theme .bg-blob {
  opacity: 0.25;
}

.blob-1 { background: #3b82f6; top: 10%; left: -5%; }
.blob-2 { background: #4f46e5; bottom: 10%; right: -5%; animation-delay: -5s; }

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(80px, 60px) scale(1.15); }
  100% { transform: translate(-40px, 100px) scale(0.9); }
}

#particleCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: -1;
}

/* Glass Card */
.glass-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(12px);
  border-radius: 16px;
  padding: 30px;
  transition: background 0.3s ease, border-color 0.3s ease, transform var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.glass-card:hover {
  border-color: var(--card-hover-border);
}

/* ==========================================================================
   4. HEADER & NAVIGATION
   ========================================================================== */
#scrollProgress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--accent-color);
  width: 0%;
  z-index: 1000;
  transition: width 0.1s ease-out;
}

.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 20px 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(5px);
  border-bottom: 1px solid var(--card-border);
  transition: background 0.3s ease, border-color 0.3s ease;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent-color);
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  margin-left: 25px;
  font-size: 0.95rem;
  transition: var(--transition-fast);
}

.nav-links a:hover {
  color: var(--text-main);
}

#themeToggle {
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 1.2rem;
  cursor: pointer;
  margin-left: 20px;
}

.menu-toggle {
  display: none;
}

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

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: center;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  border-radius: 20px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 10px #10b981;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 15px;
}

.highlight {
  color: var(--accent-color);
}

.hero-subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 30px;
  max-width: 500px;
}

.hero-buttons {
  display: flex;
  gap: 15px;
}

.btn {
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition-smooth);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--accent-color);
  color: #ffffff;
}

.btn-primary:hover {
  box-shadow: 0 0 20px var(--accent-glow);
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--card-bg);
  color: var(--text-main);
  border: 1px solid var(--card-border);
}

.btn-secondary:hover {
  border-color: var(--accent-color);
  transform: translateY(-2px);
}

.profile-img {
  width: 100%;
  max-width: 280px;
  border-radius: 16px;
  display: block;
  margin: 0 auto;
}

.profile-img-round {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent-color);
  box-shadow: 0 0 20px var(--accent-glow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-img-round:hover {
  transform: scale(1.05);
  box-shadow: 0 0 30px var(--accent-glow);
}

/* ==========================================================================
   6. SECTIONS & BENTO GRID
   ========================================================================== */
.section {
  padding: 100px 0;
}

.section-title {
  font-size: 2rem;
  margin-bottom: 40px;
  position: relative;
}

.bento-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}

/* ==========================================================================
   7. SKILLS & PROJECTS GRID
   ========================================================================== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 15px;
}

.skill-card {
  text-align: center;
  padding: 20px;
  font-weight: 600;
}

.project-filters {
  display: flex;
  gap: 10px;
  margin-bottom: 30px;
}

.filter-btn {
  padding: 8px 18px;
  border-radius: 20px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-fast);
}

.filter-btn.active, .filter-btn:hover {
  background: var(--accent-color);
  color: #ffffff;
  border-color: var(--accent-color);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
}

.project-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.project-card h3 {
  margin-bottom: 10px;
}

.project-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 20px;
}

.project-links {
  display: flex;
  gap: 15px;
}

.project-links a {
  color: var(--accent-color);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
}

/* ==========================================================================
   8. CONTACT FORM & FOOTER
   ========================================================================== */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-width: 600px;
  margin: 0 auto;
}

.contact-form input, 
.contact-form textarea {
  width: 100%;
  padding: 14px;
  border-radius: 8px;
  background: var(--input-bg);
  border: 1px solid var(--card-border);
  color: var(--text-main);
  outline: none;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.contact-form input:focus, 
.contact-form textarea:focus {
  border-color: var(--accent-color);
}

.footer {
  text-align: center;
  padding: 40px 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  border-top: 1px solid var(--card-border);
}

/* ==========================================================================
   9. HACKER TYPER BOX STYLES
   ========================================================================== */
.hacker-box {
  margin-top: 25px;
  padding: 15px 20px;
  font-family: var(--font-mono);
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  max-width: 500px;
}

.hacker-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 8px;
}

.hacker-title {
  font-size: 11px;
  color: var(--text-muted);
  margin-left: 8px;
}

.hacker-body {
  font-size: 13.5px;
  color: #34d399; /* হ্যাকার গ্রিন টোন */
}

.hacker-body .prompt {
  color: var(--accent-color);
  font-weight: bold;
  margin-right: 6px;
}

.cursor-blink {
  animation: blinkCursor 0.8s infinite;
  color: var(--accent-color);
  font-weight: bold;
}

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

/* ==========================================================================
   10. LIVE TELEMETRY HUD WIDGET (Responsive - Desktop & Mobile)
   ========================================================================== */
.hud-telemetry {
  position: fixed;
  bottom: 25px;
  left: 25px;
  z-index: 999;
  display: flex;
  gap: 12px;
  background: rgba(11, 15, 25, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--card-border);
  padding: 8px 16px;
  border-radius: 20px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 15px var(--accent-glow);
  pointer-events: none;
}

.hud-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hud-dot {
  width: 6px;
  height: 6px;
  background-color: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 8px #10b981;
}

.hud-telemetry strong {
  color: var(--accent-color);
}

/* ==========================================================================
   11. REALISTIC & CLEAN FLOATING TERMINAL WIDGET
   ========================================================================== */
#terminal-widget-container {
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 999999;
  font-family: var(--font-mono);
}

.terminal-trigger {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--bg-color);
  border: 1.5px solid var(--accent-color);
  color: var(--accent-color);
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.7), 0 0 15px var(--accent-glow);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.terminal-trigger:hover {
  transform: scale(1.1) rotate(5deg);
  background: var(--accent-color);
  color: #ffffff;
  box-shadow: 0 10px 30px var(--accent-glow);
}

.floating-terminal {
  position: fixed !important;
  bottom: 90px !important;
  right: 20px !important;
  width: 360px !important;
  max-width: calc(100vw - 30px) !important;
  background: rgba(11, 15, 25, 0.96) !important;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: 12px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9), 0 0 30px var(--accent-glow);
  z-index: 1000000 !important;
  overflow: hidden;
  animation: popUpTerminal 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes popUpTerminal {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.terminal-header {
  background: rgba(15, 23, 42, 0.95);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.terminal-dots {
  display: flex;
  gap: 6px;
}

.dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  cursor: pointer;
}
.dot.red { background: #ff5f56; border: 0.5px solid #e0443e; }
.dot.yellow { background: #ffbd2e; border: 0.5px solid #dea123; }
.dot.green { background: #27c93f; border: 0.5px solid #1aab29; }

.terminal-title {
  margin-left: 12px;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.5px;
}

.terminal-minimize {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  transition: color 0.2s;
}
.terminal-minimize:hover {
  color: var(--text-main);
}

.floating-terminal .terminal-body {
  padding: 14px;
  height: 240px;
  overflow-y: auto;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-main);
}

.terminal-output p {
  margin: 4px 0;
  word-break: break-all;
}

.system-msg {
  color: #38bdf8 !important;
}

.highlight {
  color: #60a5fa !important;
  font-weight: bold;
}

.user-command {
  color: #34d399 !important;
}

.terminal-input-line {
  display: flex;
  align-items: center;
  margin-top: 8px;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
  padding-top: 8px;
}

.prompt-symbol {
  color: #34d399 !important;
  margin-right: 6px;
  white-space: nowrap;
  font-weight: bold;
}

#terminal-input {
  background: transparent;
  border: none;
  color: var(--text-main);
  outline: none;
  width: 100%;
  font-family: var(--font-mono);
  font-size: 13.5px;
}

/* ==========================================================================
   12. RESPONSIVE MEDIA QUERIES
   ========================================================================== */
@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 30px;
  }

  .hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hero-title { font-size: 2.8rem; }
  .hero-subtitle { margin: 0 auto 25px auto; }
  .hero-buttons { justify-content: center; }
  .bento-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .section { padding: 60px 0; }
  .navbar { padding: 12px 0; }

  .nav-links {
    position: fixed;
    top: 60px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 60px);
    background: var(--nav-mobile-bg);
    backdrop-filter: blur(16px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 25px;
    transition: left 0.3s ease-in-out;
  }

  .nav-links.active { left: 0; }
  .nav-links a { margin-left: 0; font-size: 1.2rem; }

  .menu-toggle {
    display: block;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 1.4rem;
    cursor: pointer;
  }

  .hero-section {
    min-height: auto;
    padding-top: 110px;
    padding-bottom: 50px;
  }

  .hero-title { font-size: 2.2rem; }
  .hero-subtitle { font-size: 0.98rem; }
  .profile-img { max-width: 200px; }

  .skills-grid {
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
  }

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

  .project-filters {
    overflow-x: auto;
    padding-bottom: 10px;
    justify-content: flex-start;
  }

  .filter-btn {
    white-space: nowrap;
    padding: 6px 14px;
    font-size: 0.85rem;
  }

  .contact-form { padding: 20px; }
  .btn { width: 100%; text-align: center; }

  .hero-buttons {
    width: 100%;
    flex-direction: column;
    gap: 10px;
  }

  /* মোবাইল স্ক্রিনের জন্য HUD উইজেট অপ্টিমাইজড সাইজ ও পজিশন */
  .hud-telemetry {
    bottom: 15px;
    left: 15px;
    padding: 5px 10px;
    font-size: 9px;
    gap: 6px;
    z-index: 99;
  }
  
  .hud-dot {
    width: 5px;
    height: 5px;
  }
}

@media (max-width: 480px) {
  .hero-title { font-size: 1.8rem; }
  .section-title { font-size: 1.5rem; }
  .glass-card { padding: 20px; }
  
  /* একবারে ছোট স্ক্রিনে ফন্ট বা প্যাডিং আরও গুছিয়ে রাখা */
  .hud-telemetry {
    bottom: 10px;
    left: 10px;
    padding: 4px 8px;
    font-size: 8.5px;
  }
}
