
/* =========================================
   Root Variables and Theme
   ========================================= */
 
   :root {
    --bg: #ffffff;
    --text: #111827;
    --muted: #6b7280;
    --accent: #2563eb;
    --accent-glow: #dbeffe;
    --card: #f9fafb;
    --border: #e5e7eb;
  }
  
  body.dark {
    --bg: #0b1220;
    --text: #e5e7eb;
    --muted: #9ca3af;
    --accent: #60a5fa;
    --accent-glow: #1e1b4b;
    --card: #111827;
    --border: #1f2937;
  }
  
  /* =========================================
     Global Reset & HTML
     ========================================= */
  
  * {
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
  }
  
  html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
  }
  
  /*==========================================
     Gloabal Body
     =========================================*/
  
  body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    color: var(--text);
  
    background:
      radial-gradient(circle at top left, rgba(29,191,115,0.06), transparent 40%),
      radial-gradient(circle at bottom right, rgba(0,0,0,0.05), transparent 40%),
      var(--bg);
  
    transition: background 0.3s ease, color 0.3s ease;
  }
  
  #code-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
  }
  
  /*=========================================
     Custom Scrollbar
     =========================================*/
  
  ::-webkit-scrollbar { width: 10px; }
  ::-webkit-scrollbar-track { background: transparent; }
  
  ::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: content-box;
  }
  
  ::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
  
  body.dark ::-webkit-scrollbar-thumb { background: #334155; }
  body.dark ::-webkit-scrollbar-thumb:hover { background: var(--accent); }
  
  /* =========================================
     NAVBAR
     ========================================= */
  
  .navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    transition: background 0.3s ease, border-color 0.3s ease;
  }
  
  body.dark .navbar {
    background: rgba(11, 18, 32, 0.85);
  }
  
  .nav-container {
    max-width: 1100px;
    margin: auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  
  .logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.1rem;
  }
  
  .logo img {
    width: 32px;
    height: 32px;
  }
  
  .nav-links {
    display: flex;
    gap: 24px;
  }
  
  .nav-link {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s ease;
  }
  .nav-link {
    position: relative;
    padding: 8px 0;
  }
  
  /* The indicator line */
  .nav-link::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0; /* Hidden by default */
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease, left 0.3s ease;
    border-radius: 2px;
  }
  
  /* When active, the line grows to full width */
  .nav-link.active::after {
    width: 100%;
  }
  
  .nav-link.active {
    color: var(--accent) !important;
    transition: color 0.3s ease;
  }
  
  .nav-link.active::after {
    content: "";
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
  }
  .nav-link:hover, .nav-link.active {
    color: var(--accent);
  }
  
  .nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
  }
  
  /* Theme Toggle Button */
  .theme-toggle {
    background: transparent;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    transition: background 0.2s ease;
  }
  
  .theme-toggle:hover {
    background: rgba(0, 0, 0, 0.05);
  }
  body.dark .theme-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
  }
  
  /* Mobile Menu Button */
  .menu-btn {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text);
    cursor: pointer;
  }
  
  .mobile-menu {
    display: none;
    flex-direction: column;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
  }
  
  .mobile-menu.show {
    display: flex;
  }
  
  .mobile-menu a {
    padding: 16px 20px;
    text-decoration: none;
    color: var(--text);
    border-bottom: 1px solid var(--border);
  }
  
  /* =========================================
     Hero Section
     ========================================= */
  
  .hero {
    position: relative;
    width: 100%;
    min-height: 100vh; /* Full screen height */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 20px;
    overflow: hidden;
  }
  
  .hero-center {
    max-width: 800px;
    position: relative;
    z-index: 2;
  }
  
  .hero h1 {
    font-size: 3rem;
    line-height: 1.1;
    margin-bottom: 20px;
    font-weight: 800;
    letter-spacing: -0.02em;
  }
  
  .hero h1 span {
    color: var(--accent);
  }
  
  .hero p {
    font-size: 1.15rem;
    color: var(--muted);
    max-width: 600px;
    margin: 0 auto 30px auto;
    line-height: 1.6;
  }
  
  /* --- THE FLOWER BLOB ANIMATION --- */
  .hero-text {
    position: relative;
    display: inline-block;
    z-index: 1;
  }
  /* =========================================
      Buttons
     ========================================= */
  .hero-links {
    display: flex;
    gap: 16px;
    justify-content: center;
    position: relative;
    z-index: 10;      
    margin-top: 30px;
  
  }
  .hero-links a {
    opacity: 1 !important;      
    visibility: visible !important;
    transform: none !important;  /* Resets any weird positions */
  }
  
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
  }
  
  .btn.primary {
    background: var(--accent);
    color: white;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
  }
  
  .btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
  }
  
  .btn.outline {
    background: transparent;
    color: var(--accent);
    border: 1.5px solid var(--accent);
  }
  
  .btn.outline:hover {
    background: var(--accent);
    color: white;
  }
  
  /* =========================================
     SECTIONS (About, Projects, Skills)
     ========================================= */
  .section {
    padding: 100px 20px;
    max-width: 1100px;
    margin: auto;
    background: transparent;
  }
  .section-alt {
    background: rgba(37, 99, 235, 0.03); /* subtle blue tint */
    border-radius: 32px;
    padding-left: 20px;
    padding-right: 20px;
    margin-top: 60px;
    margin-bottom: 60px;
  }
  
  .section h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-align: center;
  }
  
  .section-desc {
    text-align: center;
    color: var(--muted);
    margin-bottom: 50px;
    font-size: 1.1rem;
  }
  
  /* --- ABOUT SECTION --- */
  .about-container {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 50px;
    align-items: center;
  }
  
  .about-image img {
    width: 100%;
    max-width: 350px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  }
  
  .typewriter {
    color: var(--accent);
    min-height: 1.5em;
  }
  
  /* --- PROJECTS (Horizontal Scroll) --- */
  .project-scroll {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    padding-bottom: 30px; /* Space for shadow */
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }
  
  .project-scroll::-webkit-scrollbar {
    height: 8px;
  }
  .project-scroll::-webkit-scrollbar-thumb {
    background: var(--muted);
    border-radius: 4px;
  }
  
  .project-card {
    min-width: 300px;
    max-width: 300px;
    background: var(--card);
    padding: 20px;
    border-radius: 16px;
    border: 1px solid var(--border);
    cursor: pointer;
    scroll-snap-align: center;
    transition: transform 0.4s ease,
      filter 0.4s ease,
      opacity 0.4s ease;
  }
  
  .project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
  }
  
  .project-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 15px;
  }
  
  .project-card h3 {
    margin: 0 0 8px 0;
    font-size: 1.25rem;
  }
  
  .project-card span {
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: 500;
  }
  
  /* --- SKILLS GRID --- */
  .skills-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 column grid */
    grid-auto-rows: 180px;
    gap: 20px;
  }
  
  /* Make Python/Django take up 2 columns and 2 rows */
  .skill-box.featured {
    grid-column: span 2;
    grid-row: span 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: linear-gradient(135deg, var(--card), var(--accent-glow));
  }
  
  /* On mobile, go back to 1 column */
  @media (max-width: 768px) {
    .skills-grid {
      grid-template-columns: 1fr;
      grid-auto-rows: auto;
    }
    .skill-box.featured { grid-column: span 1; grid-row: span 1; }
  }
  
  .skill-box {
    background: var(--card);
    padding: 24px;
    border-radius: 16px;
    border: 1px solid var(--border);
    text-align: center;
    transition: transform 0.3s ease;
    cursor: pointer;
  }
  
  .skill-box:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
  }
  
  .skill-title {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 8px;
  }
  
  .skill-sub {
    color: var(--muted);
    font-size: 0.9rem;
  }
  
  /* =========================================
      CONTACT
     ========================================= */
  .contact-section {
    text-align: center;
  }
  
  .contact-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
  }
  
  .contact-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  /* =========================================
      FOOTER 
     ========================================= */
  
  /* 1. DEFAULT (Light Mode) -> Dark Footer */
  .footer {
    background-color: #0f172a;
    color: #cbd5e1;
  
    padding:16px 24px; /* 🔥 reduced height */
    margin-top: 40px;
  
    font-size: 0.85rem; 
    line-height: 1.4;
    min-height: unset;
    transition: background-color 0.3s ease, color 0.3s ease;
  }
  
  /* 2. DARK MODE -> White Footer (The Flip) */
  body.dark .footer {
    background-color: #ffffff; /* Bright White BG */
    color: #0f172a;            /* Dark Navy Text */
    border-top: 1px solid #e2e8f0;
  }
  
  /* --- HEADINGS --- */
  /* Default (Light Mode) */
  .footer-brand h3,
  .footer-col h4 {
    margin-bottom: 8px;
    font-size: 0.95rem;
    font-weight: 600;
  }
  .footer-brand p {
    margin: 4px 0;               /* 🔥 removes tall gaps */
    max-width: 380px;
  }
  
  
  /* Dark Mode Override (CRITICAL FIX) */
  body.dark .footer-brand h3, 
  body.dark .footer-col h4 {
    color: #0f172a; /* Dark text on White BG */
  }
  
  /* --- LINKS --- */
  /* Default */
  .footer-col a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s ease;
  }
  
  /* Dark Mode Override */
  body.dark .footer-col a {
    color: #475569; /* Dark Grey links */
  }
  
  /* Hover is same for both */
  .footer-col a:hover {
    color: #3b82f6;
  }
  
  /* --- LAYOUT & SPACING --- */
  .footer-content {
    max-width: 1100px;
    margin: 0 auto;
  
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
  
    padding-bottom: 8px;         /* 🔥 reduced */
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }
  
  
  /* Fix border color in Dark Mode */
  body.dark .footer-content {
    border-bottom: 1px solid #e2e8f0;
  }
  
  /* --- BRAND & LISTS --- */
  .footer-links-group {
    display: flex;
    gap: 28px; /* 🔥 was too wide */
  }
  
  
  .footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
  }
  
  .footer-col li {
    margin-bottom: 4px;
  }
  
  /* --- BOTTOM BAR (Centered to fix Resume Button overlap) --- */
  .footer-bottom {
    display: flex;
    justify-content: center;
    align-items: center;
  
    gap: 12px;
    margin-top: 6px;             /* 🔥 very small */
  
    font-size: 0.75rem;
    color: #64748b;
  }
  
  .back-to-top {
    background: rgba(255,255,255,0.05);
    color: #3b82f6;
    border: none;
    padding: 6px 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
  }
  
  .back-to-top:hover {
    background: rgba(255,255,255,0.1);
  }
  
  /* Dark Mode Back-to-Top */
  body.dark .back-to-top {
    background: #f1f5f9; /* Light grey bg */
  }
  body.dark .back-to-top:hover {
    background: #e2e8f0;
  }/* =========================================
      MODALS & FLOATING BUTTONS
     ========================================= */
  /* Floating Resume Button */
  .resume-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--accent);
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.4);
    z-index: 2000; /* Highest priority */
    transition: transform 0.3s ease;
  }
  
  .resume-float:hover {
    transform: translateY(-4px);
  }
  
  /* Modals */
  .modal {
    display: none; /* Hidden by default */
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 3000;
    align-items: center;
    justify-content: center;
    padding: 20px;
  }
  
  .modal-content {
    background: var(--bg);
    width: 100%;
    max-width: 500px;
    padding: 30px;
    border-radius: 20px;
    position: relative;
    box-shadow: 0 25px 50px rgba(0,0,0,0.25);
    border: 1px solid var(--border);
  }
  
  .close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    color: var(--muted);
  }
  
  .modal-content img {
    width: 100%;
    border-radius: 12px;
    margin-top: 10px;
    margin-bottom: 20px;
    object-fit: cover;
  }
  
  /* Formatting for modal text (Bullet points) */
  #modalDesc, #skillDesc {
    white-space: pre-line;
    line-height: 1.6;
    color: var(--text);
  }
  
  /* =========================================
     MOBILE RESPONSIVENESS
     ========================================= */
  @media (max-width: 768px) {
    .nav-links { display: none; }
    .menu-btn { display: block; }
    
    .hero h1 { font-size: 2.2rem; }
    
    .about-container { grid-template-columns: 1fr; text-align: center; }
    .about-image img { margin: 0 auto; }
    .footer{
      padding: 14px 16px;
    }
    .footer-content {
      flex-direction: column;
      text-align: left;
      align-items: center;
      gap: 12px;
    }
    
    .footer-links-group {
      gap: 30px;
      text-align: left;
    }
    .footer-bottom{
      margin-top: 4px;
    }
    .footer { padding-bottom: 80px; }
  }
  .terminal-window {
    background: #1e1e1e;
    border-radius: 8px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    overflow: hidden;
    font-family: 'Courier New', monospace;
    margin-top: 20px;
  }
  .terminal-header {
    background: #333;
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
  }
  .dot { width: 12px; height: 12px; border-radius: 50%; }
  .red { background: #ff5f56; }
  .yellow { background: #ffbd2e; }
  .green { background: #27c93f; }
  .terminal-title { color: #9ca3af; font-size: 12px; margin-left: 10px; }
  .terminal-body { padding: 20px; color: #f8f8f2; font-size: 0.9rem; line-height: 1.6; }
  .prompt { color: #50fa7b; }
  .accent-text { color: var(--accent); font-weight: bold; }
  .cursor { animation: blink 1s infinite; border-left: 8px solid var(--accent); margin-left: 5px; }
  @keyframes blink { 50% { opacity: 0; } }

  /* --- BENTO GRID SYSTEM --- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 columns on desktop */
    grid-auto-rows: 180px;
    gap: 20px;
  }
  
  /* Glassmorphism Skill Boxes */
  .skill-box {
    background: rgba(255, 255, 255, 0.45); /* Light translucent */
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  }
  
  body.dark .skill-box {
    background: rgba(17, 24, 39, 0.6); /* Dark translucent */
    border: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  /* Bento Featured Card (Double Size) */
  .skill-box.featured {
    grid-column: span 2;
    grid-row: span 2;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(255, 255, 255, 0.4));
  }
  
  body.dark .skill-box.featured {
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.15), rgba(17, 24, 39, 0.6));
  }
  
  .skill-box:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--accent);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.7);
  }
  
  body.dark .skill-box:hover {
    background: rgba(30, 41, 59, 0.8);
  }
  
  /* --- RESPONSIVENESS --- */
  @media (max-width: 1024px) {
    .skills-grid { grid-template-columns: repeat(2, 1fr); }
  }
  
  @media (max-width: 600px) {
    .skills-grid { 
      grid-template-columns: 1fr; 
      grid-auto-rows: auto;
    }
    .skill-box.featured { grid-column: span 1; grid-row: span 1; }
  }
  
  /* --- GLASS NAV & CARDS --- */
  .navbar, .project-card, .modal-content {
    background: rgba(255, 255, 255, 0.7) !important;
    backdrop-filter: blur(15px) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
  }
  
  body.dark .navbar, body.dark .project-card, body.dark .modal-content {
    background: rgba(11, 18, 32, 0.8) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
  }
  
  /* Layout for Hero Container */
.hero-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0 40px;
  z-index: 2;
}

.hero-text {
  flex: 1.2;
  text-align: left; 
  pointer-events: auto;
}

.hero-robot {
  flex: 1;
  height: 600px;
  width: 100%;
  position: relative;
  overflow: hidden; 
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

/* THE SPOTLIGHT EFFECT */
.hero {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  /* Start the spotlight in the center */
  --mouse-x: 50%;
  --mouse-y: 50%;
  background: transparent; /* This lets your code-bg and body gradient show through */
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    600px circle at var(--mouse-x) var(--mouse-y),
    var(--accent-glow), /* Uses your existing theme's glow color */
    transparent 40%
  );
  z-index: 1;
  pointer-events: none;
  opacity: 0.6; /* Subtle effect so it doesn't hide your code background */
}
spline-viewer {
  width: 100%;
  height: 700px; 
  position: absolute;
  bottom: -87px; 
  transform: scale(0.9); 
  pointer-events: auto;
}
/* Mobile responsive fix */
@media (max-width: 768px) {
  .hero-container {
    flex-direction: column;
    text-align: center;
    padding-top: 80px;
  }
  .hero-text { padding-right: 0;margin-bottom: 20px; }
  .hero-robot { height: 400px;width: 100; }
}
@media (max-width: 768px) {
  spline-viewer {
    transform: scale(0.7);
    bottom: -100px;
  }
}
.loader {
  width: 48px;
  height: 48px;
  border: 5px solid var(--accent);
  border-bottom-color: transparent;
  border-radius: 50%;
  display: inline-block;
  box-sizing: border-box;
  animation: rotation 1s linear infinite;
  position: absolute;
}

@keyframes rotation {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}