/* ==========================================================================
   CSS Design System & Variables (Premium Light & Dark Modes)
   ========================================================================== */
:root {
  --font-header: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Colors - Light Theme */
  --bg-color: #f8fafc;         /* Crisp, clean light slate background */
  --bg-card: rgba(255, 255, 255, 0.85); /* Semi-transparent white card background */
  --border-card: rgba(148, 163, 184, 0.12); /* Subtle slate border */
  --border-card-hover: rgba(14, 165, 233, 0.35); /* Cyber sky blue hover border */
  
  --text-primary: #0f172a;     /* Slate-900 (High contrast) */
  --text-secondary: #475569;   /* Slate-600 */
  --text-muted: #94a3b8;       /* Slate-400 */
  
  --accent-cyan: #0ea5e9;      /* Sky Blue */
  --accent-blue: #2563eb;      /* Royal Blue */
  --accent-purple: #7c3aed;    /* Indigo-purple */
  --accent-pink: #ec4899;      /* Pink */
  
  --gradient-main: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-blue) 50%, var(--accent-purple) 100%);
  --shadow-neon: 0 4px 20px rgba(14, 165, 233, 0.12);
  --shadow-card: 0 10px 30px -10px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.02);
  
  --transition-smooth: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
  --theme-toggle-bg: #e2e8f0;
  --theme-toggle-color: #475569;
}

[data-theme="dark"] {
  /* Colors - Dark Theme */
  --bg-color: #0b0f19;         /* Rich slate dark background */
  --bg-card: rgba(17, 24, 39, 0.85); /* Semi-transparent dark card background */
  --border-card: rgba(255, 255, 255, 0.05); /* Subtle dark border */
  --border-card-hover: rgba(56, 189, 248, 0.4); /* Cyber sky blue hover border */
  
  --text-primary: #f3f4f6;     /* High contrast off-white text */
  --text-secondary: #9ca3af;   /* Muted gray text */
  --text-muted: #4b5563;       /* Darker muted text */
  
  --accent-cyan: #38bdf8;      /* Vibrant Sky Blue */
  --accent-blue: #3b82f6;      /* Royal Blue */
  --accent-purple: #a855f7;    /* Purple */
  --accent-pink: #f472b6;      /* Pink */
  
  --shadow-neon: 0 4px 25px rgba(56, 189, 248, 0.15);
  --shadow-card: 0 10px 35px -10px rgba(0, 0, 0, 0.6), 0 1px 3px rgba(0, 0, 0, 0.4);
  
  --theme-toggle-bg: #1f2937;
  --theme-toggle-color: #e5e7eb;
}

/* ==========================================================================
   Base Styles & Scrollbar
   ========================================================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-color);
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-cyan);
}

/* ==========================================================================
   Aesthetic Elements (Grid & Glows)
   ========================================================================== */
.bg-grid {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  background-size: 50px 50px;
  background-image: 
    linear-gradient(to right, rgba(148, 163, 184, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(148, 163, 184, 0.05) 1px, transparent 1px);
  mask-image: radial-gradient(ellipse at 50% 50%, black, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 50%, black, transparent 80%);
}

.glow-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  z-index: -1;
  opacity: 0.1;
  pointer-events: none;
}

.orb-1 {
  width: 500px;
  height: 500px;
  top: -10%;
  right: -5%;
  background: radial-gradient(circle, var(--accent-cyan) 0%, transparent 70%);
  animation: floatOrb 12s infinite alternate ease-in-out;
}

.orb-2 {
  width: 600px;
  height: 600px;
  bottom: -15%;
  left: -10%;
  background: radial-gradient(circle, var(--accent-purple) 0%, transparent 70%);
  animation: floatOrb 16s infinite alternate-reverse ease-in-out;
}

@keyframes floatOrb {
  0% { transform: translateY(0) scale(1); }
  100% { transform: translateY(40px) scale(1.1); }
}

/* ==========================================================================
   Typography & Buttons
   ========================================================================== */
h1, h2, h3, h4 {
  font-family: var(--font-header);
  font-weight: 700;
  letter-spacing: -0.02em;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-smooth);
}

.gradient-text {
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-title {
  font-size: 2.25rem;
  margin-bottom: 1.5rem;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 40px;
  height: 3px;
  background: var(--accent-cyan);
  border-radius: 2px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: var(--transition-smooth);
}

.btn-primary {
  background: var(--gradient-main);
  color: #fff;
  box-shadow: var(--shadow-neon);
}

.btn-primary:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
  box-shadow: 0 6px 25px rgba(14, 165, 233, 0.25);
}

.btn-secondary {
  background: #ffffff;
  color: var(--text-primary);
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.02);
}

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

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: rgba(248, 250, 252, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.25rem 4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-header);
  font-size: 1.4rem;
  font-weight: 800;
}

.logo-accent {
  color: var(--accent-cyan);
}

nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 2.25rem;
}

.nav-link {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.nav-link:hover, .nav-link.active-nav {
  color: var(--accent-cyan);
  text-shadow: 0 0 10px rgba(14, 165, 233, 0.15);
}

.nav-btn {
  padding: 0.5rem 1rem;
  border-radius: 6px;
  border: 1px solid var(--accent-cyan);
  color: var(--accent-cyan);
}

.nav-btn:hover {
  background: var(--accent-cyan);
  color: #ffffff;
  box-shadow: 0 0 15px rgba(14, 165, 233, 0.2);
}

.theme-toggle-btn {
  background: var(--theme-toggle-bg);
  border: 1px solid var(--border-card);
  color: var(--theme-toggle-color);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: var(--transition-smooth);
  margin-left: 1rem;
}

.theme-toggle-btn:hover {
  background: var(--accent-cyan);
  color: #ffffff;
  border-color: var(--accent-cyan);
  box-shadow: var(--shadow-neon);
  transform: translateY(-1px);
}

.mobile-nav-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
}

/* ==========================================================================
   Bento Grid Layout
   ========================================================================== */
.bento-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 9rem 4rem 4rem;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.5rem;
  grid-auto-flow: dense;
}

.bento-item {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 20px;
  padding: 2.5rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-card);
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.bento-item:hover {
  border-color: var(--border-card-hover);
  transform: translateY(-2px);
  box-shadow: 0 15px 35px -10px rgba(15, 23, 42, 0.12);
}

/* ==========================================================================
   Bento Cards Customizations
   ========================================================================== */

/* Hero Profile Card */
.profile-hero {
  grid-column: span 8;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.profile-hero .badge {
  display: inline-block;
  align-self: flex-start;
  padding: 0.35rem 0.85rem;
  background: rgba(14, 165, 233, 0.08);
  border: 1px solid rgba(14, 165, 233, 0.15);
  border-radius: 50px;
  color: var(--accent-cyan);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.profile-hero h1 {
  font-size: 2.75rem;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.hero-lead {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 1.75rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
}

/* GitHub Stats Card */
.github-stats-card {
  grid-column: span 4;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.github-stats-card h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

/* At a Glance credentials card */
.glance-list { display: flex; flex-direction: column; gap: 0.75rem; flex-grow: 1; justify-content: center; }
.glance-item {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border-card);
  border-radius: 14px;
  transition: var(--transition-smooth);
  color: inherit;
}
.glance-item:hover {
  border-color: var(--border-card-hover);
  box-shadow: var(--shadow-neon);
  transform: translateY(-2px);
}
.glance-item i { font-size: 1.4rem; color: var(--accent-cyan); }
.glance-item strong { display: block; font-size: 0.95rem; color: var(--text-primary); }
.glance-item span { font-size: 0.78rem; color: var(--text-secondary); line-height: 1.35; }
.glance-item.active-focus {
  border-color: rgba(14, 165, 233, 0.45);
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.08) 0%, rgba(37, 99, 235, 0.08) 100%);
  box-shadow: 0 4px 15px rgba(14, 165, 233, 0.06);
}
[data-theme="dark"] .glance-item.active-focus {
  border-color: rgba(56, 189, 248, 0.45);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.08) 0%, rgba(59, 130, 246, 0.08) 100%);
}
.glance-item.active-focus i {
  color: var(--accent-cyan);
  filter: drop-shadow(0 0 4px rgba(14, 165, 233, 0.4));
}

/* Education & Experience (extracted from inline styles) */
.edu-block { background: transparent; border: none; padding: 0; margin-top: 1rem; }
.edu-item { margin-bottom: 1.25rem; }
.edu-item h4 {
  font-size: 1.05rem;
  margin-bottom: 0.15rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.edu-item h4 i { color: var(--accent-cyan); }
.edu-item p { font-size: 0.9rem; color: var(--text-secondary); margin-left: 1.55rem; }
.certs-title {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  padding-top: 1rem;
  color: var(--text-primary);
}
.certs-title i { color: var(--accent-cyan); }
.certs-list { list-style: none; padding-left: 0.2rem; }
.certs-list li {
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding: 0.25rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.certs-list li i { color: var(--accent-cyan); }
.exp-item {
  margin-bottom: 1.25rem;
  border-left: 2px solid rgba(14, 165, 233, 0.2);
  padding-left: 1rem;
  position: relative;
}
.exp-item:last-child { margin-bottom: 0; }
.exp-item::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-cyan);
}
.exp-item .exp-dates {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-cyan);
  display: block;
}
.exp-item h4 { font-size: 1.05rem; margin-bottom: 0.15rem; color: var(--text-primary); }
.exp-item p { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.4; }

/* About Me Box */
.about-box {
  grid-column: span 6;
}

.about-box p {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

.about-box p:last-child {
  margin-bottom: 0;
}

/* Highlights / Core Principles */
.highlights-box {
  grid-column: span 6;
}

.highlight-item {
  display: flex;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.highlight-item:last-child {
  margin-bottom: 0;
}

.highlight-item i {
  font-size: 1.5rem;
  color: var(--accent-cyan);
  margin-top: 0.25rem;
}

.highlight-item h3 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
  color: var(--text-primary);
}

.highlight-item p {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* Technical Stack Card */
.skills-fullbox {
  grid-column: span 12;
}

.skills-subgrid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.skill-category h4 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.skill-category h4 i {
  color: var(--accent-cyan);
}

.skill-category ul {
  list-style: none;
}

.skill-category li {
  font-size: 0.9rem;
  color: var(--text-secondary);
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.skill-category li::before {
  content: '⚡';
  font-size: 0.75rem;
}

/* Projects Bento Section Headers */
.bento-header-wrapper {
  grid-column: span 12;
  margin-top: 2rem;
  margin-bottom: -0.5rem;
}

/* Project Filter Controls */
.project-filters {
  grid-column: span 12;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
  margin-bottom: 1.5rem;
}

.filter-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  color: var(--text-secondary);
  padding: 0.5rem 1.15rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.filter-btn:hover {
  border-color: var(--accent-cyan);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.filter-btn.active {
  background: var(--gradient-main);
  border-color: transparent;
  color: #ffffff;
  box-shadow: var(--shadow-neon);
}

.project-box.hidden-project {
  display: none !important;
}

/* Bento Project Box */
.project-box {
  grid-column: span 6;
  display: flex;
  flex-direction: column;
}

.p-studio {
  grid-column: span 8;
}

.p-mcp {
  grid-column: span 4;
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.project-number {
  font-family: var(--font-header);
  font-size: 1.5rem;
  font-weight: 800;
  color: rgba(15, 23, 42, 0.06);
}

.project-badge {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-cyan);
  background: rgba(14, 165, 233, 0.08);
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
}

.project-box h3 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.project-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

.project-details {
  background: rgba(241, 245, 249, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin-bottom: auto; /* Pushes links to the bottom */
}

.project-details ul {
  list-style: none;
}

.project-details li {
  font-size: 0.9rem;
  color: var(--text-secondary);
  padding: 0.25rem 0;
  position: relative;
  padding-left: 1.25rem;
}

.project-details li::before {
  content: '▹';
  position: absolute;
  left: 0;
  color: var(--accent-cyan);
  font-weight: bold;
}

.project-link-actions {
  margin-top: 1.5rem;
}

/* Contact Bento Box */
.contact-fullbox {
  grid-column: span 12;
  text-align: center;
  padding: 4.5rem;
}

.contact-fullbox h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.contact-fullbox p {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.email-list {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.15);
  padding: 1.25rem 2rem;
  border-radius: 12px;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.email-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.05rem;
  font-weight: 500;
}

.email-item i {
  color: var(--accent-cyan);
}

.email-item a:hover {
  color: var(--accent-cyan);
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */
footer {
  background: #ffffff;
  padding: 3rem 0;
  border-top: 1px solid rgba(148, 163, 184, 0.08);
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

footer p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  font-size: 1.25rem;
  color: var(--text-secondary);
}

.footer-links a:hover {
  color: var(--accent-cyan);
}

/* ==========================================================================
   Responsive Bento Grid Breakpoints
   ========================================================================== */
@media (max-width: 1024px) {
  .header-container {
    padding: 1.25rem 2.5rem;
  }

  .bento-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 7rem 2.5rem 3rem;
  }

  .footer-container {
    padding: 0 2.5rem;
  }
  
  .profile-hero, .github-stats-card, .about-box, .highlights-box, .skills-fullbox,
  .project-box, .p-studio, .p-mcp, .contact-fullbox {
    grid-column: span 12;
  }
  
  .skills-subgrid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  html {
    font-size: 15px;
  }
  
  .header-container {
    padding: 1rem 1.5rem;
  }

  .bento-container {
    padding: 6rem 1.5rem 2rem;
  }

  .footer-container {
    padding: 0 1.5rem;
  }
  
  .mobile-nav-toggle {
    display: block;
  }
  
  nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #ffffff;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    padding: 2rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
  }
  
  nav.active {
    display: block;
  }
  
  nav ul {
    flex-direction: column;
    gap: 1.5rem;
    align-items: stretch;
  }
  
  nav ul li {
    text-align: center;
  }
  
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .skills-subgrid {
    grid-template-columns: 1fr;
  }
  
  .email-list {
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    width: 100%;
  }
  
  .contact-fullbox {
    padding: 2.5rem 1.5rem;
  }
  
  .contact-links {
    flex-direction: column;
  }
}

/* ==========================================================================
   Blog Search Styles
   ========================================================================== */
.blog-search-card {
  grid-column: span 12;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 3.5rem;
}

.search-box-container {
  position: relative;
  width: 100%;
  max-width: 500px;
  margin-top: 1.5rem;
}

.search-box-container input {
  width: 100%;
  padding: 0.85rem 1.25rem 0.85rem 2.75rem;
  border-radius: 30px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: var(--transition-smooth);
  outline: none;
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.02);
}

.search-box-container input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 15px rgba(14, 165, 233, 0.15), 0 4px 6px rgba(15, 23, 42, 0.04);
}

.search-box-container .search-icon {
  position: absolute;
  left: 1.15rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.95rem;
}

