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

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: #ffffff;
  color: #0a0c10;
  transition: background 0.25s ease, color 0.2s ease;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

/* Dark theme */
body.dark-theme {
  background: #0a0c12;
  color: #f0f3f8;
}
body.dark-theme .bg-light-custom { background: #11131c; }
body.dark-theme .card, 
body.dark-theme .stat-card, 
body.dark-theme .about-card,
body.dark-theme .project-card,
body.dark-theme .skill-card {
  background: #13161f !important;
  border-color: rgba(255,107,53,0.25) !important;
}
body.dark-theme .navbar {
  background: #0b0e15 !important;
  box-shadow: 0 8px 20px rgba(0,0,0,0.5);
}
body.dark-theme .text-muted-light { color: #a3b3d6; }
body.dark-theme .hero-badge, 
body.dark-theme .badge-sec {
  background: rgba(255,107,53,0.15);
  color: #ffb085;
}
body.dark-theme .social-icon-link {
  color: #e0e4f0;
}
body.dark-theme .social-icon-link:hover {
  color: #ff6b35;
}

/* Navigation */
.navbar {
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(12px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.03);
  transition: all 0.2s;
  padding: 0.8rem 0;
}
body.dark-theme .navbar {
  background: rgba(11,14,21,0.96);
  backdrop-filter: blur(12px);
}
.navbar-brand {
  font-weight: 800;
  font-size: 1.7rem;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #0f2b3d, #ff6b35);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
}
.nav-link {
  font-weight: 600;
  margin: 0 0.5rem;
  position: relative;
  color: #1f2a3e !important;
}
body.dark-theme .nav-link { color: #eef2ff !important; }
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: #ff6b35;
  transition: width 0.25s ease;
  border-radius: 2px;
}
.nav-link:hover::after, .nav-link.active::after { width: 100%; }

/* Theme toggle */
.theme-switch {
  background: #eef2ff;
  border-radius: 40px;
  padding: 4px;
  display: flex;
  gap: 6px;
  margin-left: 1rem;
}
body.dark-theme .theme-switch { background: #1e2538; }
.theme-btn {
  background: transparent;
  border: none;
  width: 38px;
  height: 38px;
  border-radius: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: 0.2s;
  color: #1e2a3a;
  cursor: pointer;
}
body.dark-theme .theme-btn { color: #ffbc8c; }
.theme-btn.active {
  background: #ffffff;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
body.dark-theme .theme-btn.active {
  background: #ff6b35;
  color: white;
}

/* Hero Section */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 6rem 0 4rem;
  position: relative;
  overflow: hidden;
}
.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 50%, rgba(255,107,53,0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(15,43,61,0.08) 0%, transparent 50%),
    linear-gradient(135deg, rgba(15,43,61,0.02) 0%, rgba(255,107,53,0.02) 100%);
  z-index: -1;
}
body.dark-theme .hero-section::before {
  background: 
    radial-gradient(circle at 20% 50%, rgba(255,107,53,0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(15,43,61,0.12) 0%, transparent 50%),
    linear-gradient(135deg, rgba(255,107,53,0.03) 0%, rgba(15,43,61,0.05) 100%);
}
.hero-badge {
  display: inline-block;
  background: rgba(255,107,53,0.12);
  padding: 0.4rem 1rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #ff6b35;
  margin-bottom: 1.5rem;
  letter-spacing: 0.3px;
  position: relative;
  overflow: hidden;
}
.hero-badge::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  animation: shimmer 3s infinite;
}
@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}
.hero-title {
  font-size: 3.8rem;
  font-weight: 800;
  line-height: 1.2;
  background: linear-gradient(125deg, #1f2a46, #ff6b35);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  position: relative;
  animation: glow 3s ease-in-out infinite alternate;
}
@keyframes glow {
  from { filter: drop-shadow(0 0 20px rgba(255,107,53,0.1)); }
  to { filter: drop-shadow(0 0 25px rgba(255,107,53,0.2)); }
}
body.dark-theme .hero-title {
  background: linear-gradient(125deg, #f0f3ff, #ff8c5a);
  -webkit-background-clip: text;
  background-clip: text;
}
.highlight-text {
  color: #ff6b35;
  font-weight: 700;
}
.stat-card {
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(0,0,0,0.05);
  border-radius: 24px;
  padding: 1rem 1rem;
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent 30%, rgba(255,107,53,0.05) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.6s;
}
.stat-card:hover::before {
  transform: translateX(100%);
}
body.dark-theme .stat-card {
  background: rgba(20,25,38,0.8);
  border-color: rgba(255,107,53,0.2);
}
.stat-card:hover {
  transform: translateY(-5px);
  border-color: #ff6b35;
  box-shadow: 0 20px 35px -12px rgba(0,0,0,0.15);
}
.metric-number {
  font-size: 2rem;
  font-weight: 800;
  color: #ff6b35;
  position: relative;
  display: inline-block;
}
.metric-number::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #ff6b35, #ff8c5a);
  transition: width 0.3s ease;
}
.stat-card:hover .metric-number::after {
  width: 100%;
}
.btn-soft-primary {
  background: #ff6b35;
  color: white;
  border-radius: 50px;
  padding: 0.8rem 2rem;
  font-weight: 700;
  transition: 0.2s;
  border: none;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}
.btn-soft-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s ease;
}
.btn-soft-primary:hover::before {
  left: 100%;
}
.btn-soft-primary:hover {
  background: #e55a2b;
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -8px rgba(255,107,53,0.4);
  color: white;
}
.btn-outline-accent {
  border: 2px solid #ff6b35;
  background: transparent;
  color: #ff6b35;
  border-radius: 50px;
  padding: 0.75rem 1.8rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
}
body.dark-theme .btn-outline-accent { color: #ff8c62; border-color: #ff8c62; }
.btn-outline-accent:hover {
  background: #ff6b35;
  color: white;
}

/* Cards */
.project-card, .skill-card {
  border-radius: 16px;
  border: 1px solid rgba(0,0,0,0.05);
  background: #ffffff;
  padding: 1.25rem 1rem;
  transition: all 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
  overflow: hidden;
  height: 100%;
  position: relative;
}
.project-card::before, .skill-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255,107,53,0.02) 0%, transparent 50%, rgba(15,43,61,0.02) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 0;
}
.project-card:hover::before, .skill-card:hover::before {
  opacity: 1;
}
.project-card > *, .skill-card > * {
  position: relative;
  z-index: 1;
}
body.dark-theme .project-card, body.dark-theme .skill-card {
  background: #131722;
  border-color: #262d3e;
}
.project-card:hover {
  transform: translateY(-10px) scale(1.02);
  border-color: #ff6b35;
  box-shadow: 0 28px 40px -16px rgba(255,107,53,0.25);
}
.skill-card:hover {
  transform: translateY(-8px) scale(1.01);
  border-color: #ff6b35;
  box-shadow: 0 20px 35px -12px rgba(255,107,53,0.2);
}
.tech-badge {
  background: #f0f2f8;
  padding: 0.3rem 1rem;
  border-radius: 40px;
  font-size: 0.7rem;
  font-weight: 600;
  color: #1e2a46;
}
body.dark-theme .tech-badge {
  background: #252e42;
  color: #ddddff;
}
.icon-bg {
  width: 55px;
  height: 55px;
  background: rgba(255,107,53,0.1);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: #ff6b35;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}
.icon-bg::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255,107,53,0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.4s ease;
}
.project-card:hover .icon-bg::before,
.skill-card:hover .icon-bg::before {
  width: 100%;
  height: 100%;
}
.project-card:hover .icon-bg,
.skill-card:hover .icon-bg {
  transform: scale(1.1) rotate(5deg);
  background: rgba(255,107,53,0.15);
  box-shadow: 0 8px 25px rgba(255,107,53,0.2);
}

/* About Section */
.about-card {
  background: #ffffff;
  border-radius: 32px;
  border: 1px solid #eef2ff;
  padding: 2rem;
}
body.dark-theme .about-card {
  background: #131722;
  border-color: #282f42;
}

/* Form inputs */
.form-control {
  border-radius: 60px !important;
  padding: 12px 20px !important;
  border: 1px solid rgba(0,0,0,0.1);
}
body.dark-theme .form-control {
  background: #1a1e2c;
  border-color: #2a3145;
  color: #f0f3f8;
}
textarea.form-control {
  border-radius: 28px !important;
}

/* Social Icons */
.social-icons-container hr {
  opacity: 0.3;
}
.social-icon-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: #1f2a3e;
  transition: all 0.2s ease;
  padding: 8px 16px;
  border-radius: 50px;
  background: rgba(0,0,0,0.03);
}
body.dark-theme .social-icon-link {
  color: #e0e4f0;
  background: rgba(255,255,255,0.05);
}
.social-icon-link:hover {
  color: #ff6b35;
  transform: translateY(-3px);
  background: rgba(255,107,53,0.1);
}
.social-icon-link i {
  font-size: 1.6rem;
}

/* Footer */
footer {
  background: #f8fafd;
  padding: 2rem 0;
  border-top: 1px solid rgba(0,0,0,0.05);
}
body.dark-theme footer {
  background: #0b0e16;
  border-color: #1f2538;
}

/* Responsive */
@media (max-width: 768px) {
  .hero-title { font-size: 2.4rem; }
  .hero-section { padding-top: 7rem; }
  .stat-card { padding: 0.8rem; }
  .btn-soft-primary, .btn-outline-accent { padding: 0.6rem 1.5rem; font-size: 0.9rem; }
  .navbar-brand { font-size: 1.4rem; }
  .metric-number { font-size: 1.6rem; }
  .social-icon-link span { display: none !important; }
  .social-icon-link { padding: 10px; }
}

@media (max-width: 576px) {
  .hero-title { font-size: 2rem; }
}

/* Utility */
.bg-light-custom {
  background: #fbfdff;
}
.text-muted-light {
  color: #5a6a85;
}

/* Loading animations */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255,107,53,0.3);
  border-radius: 50%;
  border-top-color: #ff6b35;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Enhanced hover states */
.navbar-brand:hover {
  transform: scale(1.05);
  transition: transform 0.2s ease;
}

/* Smooth transitions for all interactive elements */
.btn, .nav-link, .project-card, .skill-card, .metric-card, .alert-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Focus states for accessibility */
.btn:focus, .nav-link:focus, .form-control:focus {
  outline: 2px solid #ff6b35;
  outline-offset: 2px;
}

/* Enhanced scroll behavior */
html {
  scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #ff6b35;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #e55a2b;
}

body.dark-theme ::-webkit-scrollbar-track {
  background: #1a1e2c;
}

body.dark-theme ::-webkit-scrollbar-thumb {
  background: #ff6b35;
}

/* Pulse animation for live indicators */
.pulse-live {
  animation: pulse-live 2s infinite;
}

@keyframes pulse-live {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 107, 53, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(255, 107, 53, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 107, 53, 0);
  }
}

/* Terminal-style Contact Section */
.terminal-window {
  background: #1a1a2e;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  font-family: 'Courier New', monospace;
}

.terminal-header {
  background: #0f0f1a;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid #2a2a4a;
}

.terminal-buttons {
  display: flex;
  gap: 8px;
}

.terminal-btn {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.terminal-close {
  background: #ff5f56;
}

.terminal-minimize {
  background: #ffbd2e;
}

.terminal-maximize {
  background: #27c93f;
}

.terminal-title {
  margin-left: 16px;
  color: #888;
  font-size: 0.85rem;
}

.terminal-body {
  background: #1a1a2e;
  padding: 20px;
  color: #e0e4f0;
}

.terminal-line {
  margin-bottom: 8px;
  display: flex;
  align-items: center;
}

.terminal-prompt {
  color: #ff6b35;
  margin-right: 8px;
  font-weight: bold;
}

.terminal-command {
  color: #4ecdc4;
}

.terminal-output {
  margin-left: 20px;
  color: #a0a0a0;
}

.terminal-success {
  color: #27c93f;
  margin-right: 8px;
}

.terminal-info {
  color: #3498db;
  margin-right: 8px;
}

.terminal-form {
  margin: 20px 0;
}

.terminal-input-group {
  margin-bottom: 16px;
}

.terminal-label {
  display: block;
  color: #888;
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.terminal-input {
  width: 100%;
  background: #0f0f1a;
  border: 1px solid #2a2a4a;
  border-radius: 6px;
  padding: 12px 16px;
  color: #e0e4f0;
  font-family: 'Courier New', monospace;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.terminal-input:focus {
  outline: none;
  border-color: #ff6b35;
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.terminal-input::placeholder {
  color: #555;
}

.terminal-textarea {
  resize: vertical;
  min-height: 80px;
}

.terminal-submit {
  margin-top: 20px;
}

.terminal-btn-submit {
  width: 100%;
  background: #ff6b35;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 14px 24px;
  font-family: 'Courier New', monospace;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.terminal-btn-submit:hover {
  background: #e55a2b;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.terminal-feedback {
  margin-top: 16px;
  padding: 12px;
  border-radius: 6px;
  font-size: 0.9rem;
}

.terminal-feedback.success {
  background: rgba(39, 201, 63, 0.1);
  color: #27c93f;
  border: 1px solid #27c93f;
}

.terminal-feedback.error {
  background: rgba(255, 95, 86, 0.1);
  color: #ff5f56;
  border: 1px solid #ff5f56;
}

.terminal-social-links {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.terminal-link {
  color: #4ecdc4;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 4px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.terminal-link:hover {
  background: rgba(78, 205, 196, 0.1);
  color: #3db8b0;
}

.terminal-cursor {
  animation: blink 1s infinite;
}

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

/* Rotating Skills Carousel */
.skills-carousel {
  overflow: hidden;
  padding: 20px 0;
  position: relative;
}

.skills-track {
  display: flex;
  gap: 16px;
  animation: scroll 40s linear infinite;
  width: max-content;
}

.skills-track:hover {
  animation-play-state: paused;
}

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

.skill-mini-card {
  background: var(--card-bg, #ffffff);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 180px;
  transition: all 0.3s ease;
  cursor: pointer;
}

body.dark-theme .skill-mini-card {
  background: #13161f;
  border-color: rgba(255, 107, 53, 0.2);
}

.skill-mini-card:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  border-color: #ff6b35;
}

body.dark-theme .skill-mini-card:hover {
  box-shadow: 0 8px 25px rgba(255, 107, 53, 0.3);
}

.skill-mini-card i {
  font-size: 1.4rem;
  color: #ff6b35;
  width: 28px;
  text-align: center;
}

.skill-mini-card span {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-color, #333);
}

body.dark-theme .skill-mini-card span {
  color: #e0e4f0;
}

/* Duplicate skills for seamless loop */
.skills-track::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
}

/* Responsive Design */
@media (max-width: 575.98px) {
  /* Extra small devices (phones) */
  .hero-title {
    font-size: 2rem !important;
  }
  
  .hero-section {
    padding: 4rem 0 !important;
  }
  
  .project-card, .skill-card {
    padding: 1rem 0.75rem;
    border-radius: 12px;
  }
  
  .project-card h3, .skill-card h4 {
    font-size: 1rem;
  }
  
  .project-card p, .skill-card p {
    font-size: 0.85rem;
  }
  
  .skill-mini-card {
    min-width: 140px;
    padding: 12px 16px;
  }
  
  .skill-mini-card i {
    font-size: 1.1rem;
  }
  
  .skill-mini-card span {
    font-size: 0.8rem;
  }
  
  .terminal-window {
    font-size: 0.85rem;
  }
  
  .terminal-input {
    padding: 10px 12px;
    font-size: 0.85rem;
  }
  
  .terminal-btn-submit {
    padding: 10px 16px;
    font-size: 0.9rem;
  }
}

@media (min-width: 576px) and (max-width: 767.98px) {
  /* Small devices (landscape phones) */
  .project-card, .skill-card {
    padding: 1.25rem 1rem;
    border-radius: 14px;
  }
  
  .skill-mini-card {
    min-width: 160px;
    padding: 14px 18px;
  }
}

@media (min-width: 768px) and (max-width: 991.98px) {
  /* Medium devices (tablets) */
  .project-card, .skill-card {
    padding: 1.5rem 1.25rem;
  }
  
  .skill-mini-card {
    min-width: 170px;
  }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
  /* Large devices (desktops) */
  .project-card, .skill-card {
    padding: 1.5rem 1.25rem;
  }
}

@media (min-width: 1200px) and (max-width: 1399.98px) {
  /* Extra large devices (large desktops) */
  .project-card, .skill-card {
    padding: 1.75rem 1.5rem;
  }
}

@media (min-width: 1400px) {
  /* Extra extra large devices */
  .project-card, .skill-card {
    padding: 2rem 1.75rem;
  }
  
  .hero-title {
    font-size: 3.5rem !important;
  }
  
  .skill-mini-card {
    min-width: 200px;
    padding: 18px 28px;
  }
  
  .skill-mini-card i {
    font-size: 1.6rem;
  }
  
  .skill-mini-card span {
    font-size: 1rem;
  }
}