/* =========================================
   SABARI PORTFOLIO - v2.0 PREMIUM
   Theme: Galactic Glass & Neon
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Outfit:wght@500;700;800&display=swap');

:root {
  /* --- Palette --- */
  --bg-core: #030712;       /* Deepest Void */
  --bg-surface: #0f172a;    /* Surface/Card Base */
  --bg-card: var(--bg-surface); /* Legacy alias */
  
  --primary: #8b5cf6;       /* Violet */
  --secondary: #ec4899;     /* Pink */
  --tertiary: #06b6d4;      /* Cyan */
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  
  --accent-gradient: linear-gradient(135deg, var(--primary), var(--secondary));
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-surface: rgba(255, 255, 255, 0.03);
  --glass-highlight: rgba(255, 255, 255, 0.12);
  
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  --nav-width: 280px;
  --ease-elastic: cubic-bezier(0.5, 1.5, 0.5, 1);
}

/* --- Global Reset & Base --- */
* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  background-color: var(--bg-core);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  padding-left: var(--nav-width); /* Sidebar offset */
}

body.loading { overflow: hidden; }

a { text-decoration: none; color: inherit; transition: 0.2s; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); color: #fff; }

/* --- Boot Loader (SabariOS) --- */
#boot-loader {
  position: fixed; inset: 0;
  background: #000;
  z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.8s ease, visibility 0.8s;
}
#boot-loader.fade-out { opacity: 0; visibility: hidden; }

.boot-terminal {
  width: 90%; max-width: 500px;
  background: rgba(10, 10, 15, 0.9);
  border: 1px solid #333;
  border-radius: 8px;
  padding: 2rem;
  font-family: 'Courier New', monospace;
  box-shadow: 0 0 40px rgba(139, 92, 246, 0.15);
}
.terminal-header {
  display: flex; gap: 8px; margin-bottom: 1.5rem;
}
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.red { background: #ef4444; }
.dot.amber { background: #f59e0b; }
.dot.green { background: #22c55e; }

#boot-text { font-size: 0.9rem; color: #ccc; margin-bottom: 1.5rem; }
.boot-line { display: block; margin-bottom: 0.5rem; }
.status-ok { color: var(--primary); font-weight: bold; margin-right: 5px; }
.status-info { color: var(--tertiary); font-weight: bold; margin-right: 5px; }
.status-success { color: #22c55e; font-weight: bold; margin-right: 5px; }

.boot-progress {
  height: 2px; background: #333; width: 100%;
}
.progress-fill {
  height: 100%; width: 0%; background: var(--primary);
  transition: width 0.3s;
  box-shadow: 0 0 10px var(--primary);
}

/* --- Layout --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section { padding: 8rem 0; position: relative; }
.section-header { margin-bottom: 4rem; text-align: left; }
.section-title {
  font-size: 3rem;
  background: linear-gradient(to right, #fff, #94a3b8);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
}
.section-description {
  font-size: 1.1rem; color: var(--text-muted); max-width: 600px;
}

/* --- Navigation Sidebar --- */
.navbar {
  position: fixed; left: 0; top: 0; bottom: 0;
  width: var(--nav-width);
  background: rgba(3, 7, 18, 0.95);
  backdrop-filter: blur(10px);
  border-right: 1px solid var(--glass-border);
  z-index: 100;
  padding: 2.5rem 1.5rem;
  display: flex; flex-direction: column;
}

.nav-profile {
  display: flex; align-items: center; gap: 1rem; margin-bottom: 3rem;
}
.profile-avatar {
  width: 48px; height: 48px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-name { font-weight: 700; color: #fff; font-size: 1rem; display: block; }
.profile-status { font-size: 0.75rem; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.status-dot { width: 6px; height: 6px; background: #22c55e; border-radius: 50%; box-shadow: 0 0 8px #22c55e; }

.nav-links { flex: 1; display: flex; flex-direction: column; gap: 0.5rem; }
.nav-links li a {
  display: flex; align-items: center; gap: 12px;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  color: var(--text-muted);
  font-weight: 500;
  border: 1px solid transparent;
}
.nav-links li a:hover, .nav-links li a.active {
  background: var(--glass-surface);
  color: #fff;
  border-color: var(--glass-border);
}
.nav-icon { width: 20px; height: 20px; stroke-width: 2; }
.nav-links li a.active .nav-icon { stroke: var(--primary); }

.nav-socials {
  margin-top: auto; display: flex; gap: 1rem; padding-top: 1.5rem;
  border-top: 1px solid var(--glass-border);
}
.social-icon { width: 20px; height: 20px; stroke: var(--text-muted); }
.nav-socials a:hover .social-icon { stroke: #fff; transform: translateY(-2px); }

/* --- Mobile Toggle --- */
.mobile-toggle-btn {
  display: none; /* Desktop default */
  position: fixed; top: 1.5rem; right: 1.5rem;
  z-index: 200;
  width: 40px; height: 40px;
  background: var(--bg-surface);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  flex-direction: column; justify-content: center; align-items: center; gap: 5px;
  cursor: pointer;
}
.mobile-toggle-btn span { width: 20px; height: 2px; background: #fff; transition: 0.3s; }
.mobile-overlay {
  display: none; position: fixed; inset: 0; z-index: 90;
  background: rgba(0,0,0,0.8); backdrop-filter: blur(5px);
}
.mobile-overlay.active { display: block; animation: fadeIn 0.3s; }

/* --- Hero Section --- */
.hero {
  min-height: 100vh;
  display: flex; align-items: center;
  /* Complex Gradient Background */
  background: 
    radial-gradient(circle at 80% 10%, rgba(139, 92, 246, 0.15), transparent 40%),
    radial-gradient(circle at 10% 90%, rgba(236, 72, 153, 0.1), transparent 40%);
}

.hero-grid {
  display: grid; grid-template-columns: 1.2fr 1fr;
  align-items: center; gap: 4rem;
}

.hero-text .greeting {
  color: var(--primary); font-weight: 700; letter-spacing: 2px; text-transform: uppercase; font-size: 0.875rem;
  margin-bottom: 1rem; display: block;
}
.hero-title {
  font-size: 4.5rem; line-height: 1; font-weight: 800; letter-spacing: -2px;
  margin-bottom: 1rem;
  text-shadow: 0 0 30px rgba(139, 92, 246, 0.4);
}
.role-title { font-size: 1.75rem; color: var(--text-muted); font-weight: 400; margin-bottom: 1.5rem; }
.cursor { color: var(--secondary); animation: blink 1s infinite; }
.hero-description { font-size: 1.125rem; color: var(--text-muted); max-width: 500px; margin-bottom: 2.5rem; }

.hero-buttons { display: flex; gap: 1rem; }
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.875rem 2rem; border-radius: 50px;
  font-weight: 600; font-size: 0.95rem; cursor: pointer; transition: 0.3s var(--ease-elastic);
}
.btn-primary {
  background: var(--text-main); color: var(--bg-core);
  border: none;
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(255,255,255,0.2); }
.btn-outline {
  background: transparent; color: #fff;
  border: 1px solid var(--glass-border);
}
.btn-outline:hover { background: var(--glass-surface); border-color: #fff; }

.hero-visual { position: relative; perspective: 1000px; }
.photo-editorial-frame {
  position: relative;
  width: 320px; height: 400px;
  border-radius: 20px;
  overflow: hidden;
  transform: rotateY(-10deg) rotateX(5deg);
  box-shadow: 20px 20px 60px rgba(0,0,0,0.5);
  border: 1px solid var(--glass-border);
  background: var(--bg-surface);
  transition: 0.5s ease;
}
.photo-editorial-frame:hover { transform: rotateY(0) rotateX(0); }
.profile-photo-editorial {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(20%) contrast(1.1);
}
.glow-orb {
  position: absolute; width: 400px; height: 400px; background: var(--primary);
  filter: blur(120px); opacity: 0.2; border-radius: 50%; z-index: -1;
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  animation: pulseOrb 8s infinite alternate;
}
@keyframes pulseOrb { 0% { opacity: 0.2; transform: translate(-50%, -50%) scale(0.9); } 100% { opacity: 0.3; transform: translate(-50%, -50%) scale(1.1); } }

/* --- About & Pivot (Timeline) --- */
.about-grid { display: grid; justify-items: center; }
.about-bio {
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  padding: 3rem; border-radius: 24px;
  max-width: 800px; text-align: center;
  font-size: 1.1rem; color: #ccc;
  position: relative; overflow: hidden;
}
.about-bio::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--accent-gradient);
}

.timeline { max-width: 800px; margin: 0 auto; padding-left: 2rem; position: relative; }
.timeline-line {
  position: absolute; left: 0; top: 0; bottom: 0; width: 2px;
  background: linear-gradient(to bottom, var(--primary), transparent);
}
.timeline-item { margin-bottom: 3rem; position: relative; padding-left: 2.5rem; }
.timeline-dot {
  position: absolute; left: -7px; top: 0.5rem;
  width: 16px; height: 16px; background: var(--bg-core);
  border: 3px solid var(--primary); border-radius: 50%;
  box-shadow: 0 0 10px var(--primary);
}
.timeline-date {
  font-size: 0.85rem; color: var(--primary); font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
  margin-bottom: 0.5rem; display: block;
}
.timeline-content h3 { font-size: 1.5rem; margin-bottom: 0.75rem; }
.timeline-content p { color: var(--text-muted); }

/* --- Skills & Bento Grids --- */
.skills-category-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}
.skill-category {
  background: linear-gradient(180deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.01) 100%);
  border: 1px solid var(--glass-border);
  border-radius: 20px; padding: 2rem;
  transition: 0.3s;
}
.skill-category:hover { 
  border-color: var(--glass-highlight); 
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}
.skill-category h3 {
  font-size: 1.25rem; border-bottom: 1px solid var(--glass-border);
  padding-bottom: 1rem; margin-bottom: 1.5rem; display: flex; align-items: center; justify-content: space-between;
}

.skill-list { display: flex; flex-direction: column; gap: 1rem; }
.skill-info { display: flex; justify-content: space-between; font-size: 0.9rem; margin-bottom: 0.4rem; color: #cbd5e1; }
.progress-bar {
  height: 6px; background: rgba(255,255,255,0.1); border-radius: 3px; overflow: hidden;
}
.progress { 
  height: 100%; background: var(--accent-gradient); border-radius: 3px; 
}

/* English Skills */
.language-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: 2rem;
}
.lang-card {
  background: var(--bg-surface); border: 1px solid var(--glass-border);
  border-radius: 16px; padding: 2rem 1rem; text-align: center;
  transition: 0.3s;
}
.lang-card:hover { border-color: var(--primary); transform: translateY(-3px); }
.lang-icon { color: var(--primary); margin-bottom: 1rem; }
.lang-badge { display: inline-block; padding: 4px 12px; background: rgba(139, 92, 246, 0.2); color: var(--primary); border-radius: 20px; font-size: 0.8rem; font-weight: 700; margin-top: 0.5rem; }

/* --- Projects (Featured) --- */
.projects-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}
.project-card {
  /* Project Group */
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  border-radius: 24px; overflow: hidden;
  transition: 0.4s ease;
}
.project-card:hover { transform: translateY(-8px); border-color: var(--glass-highlight); }
.project-image {
  height: 220px; background-size: cover; background-position: center;
  position: relative;
}
.project-image::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, var(--bg-surface), transparent);
}
.project-content { padding: 2rem; position: relative; }
.project-content h3 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.project-content p { color: var(--text-muted); margin-bottom: 1.5rem; font-size: 0.95rem; }
.tags { display: flex; gap: 0.5rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.tags span {
  font-size: 0.75rem; padding: 0.3rem 0.8rem; border-radius: 20px;
  background: rgba(255,255,255,0.1); color: #fff;
}
.btn-link {
  color: var(--primary); font-weight: 600; font-size: 0.9rem;
  display: flex; align-items: center; gap: 5px;
}
.btn-link:hover { color: var(--secondary); gap: 8px; }

/* Blog Tab Button */
.view-all-blogs-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 4rem 0;
}

.blog-tab-btn {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  padding: 1.5rem 3rem;
  border-radius: 100px;
  color: #fff;
  font-size: 1.25rem;
  font-weight: 600;
  transition: 0.4s var(--ease-elastic);
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.blog-tab-btn:hover {
  border-color: var(--primary);
  transform: translateY(-5px) scale(1.02);
  background: rgba(139, 92, 246, 0.05);
  box-shadow: 0 15px 40px rgba(139, 92, 246, 0.2);
}

.blog-tab-btn .tab-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  border-radius: 50%;
  padding: 6px;
  transition: 0.3s;
}

.blog-tab-btn .arrow {
  transition: 0.3s;
}

.blog-tab-btn:hover .arrow {
  transform: translateX(8px);
}

.certificate-card { background: transparent; border: 1px solid var(--glass-border); }
.certificate-image { height: 180px; border-radius: 12px; margin: 1rem; margin-bottom: 0; }

/* --- Contact & Footer --- */
.contact-container { text-align: center; max-width: 600px; background: radial-gradient(circle, rgba(139,92,246,0.1), transparent 70%); padding: 4rem 1rem; }
.footer { text-align: center; padding: 3rem; color: var(--text-muted); font-size: 0.9rem; border-top: 1px solid var(--glass-border); }

/* --- Responsive --- */
@media (max-width: 1024px) {
  body { padding-left: 0; }
  .navbar { transform: translateX(-100%); transition: 0.3s; }
  .navbar.active { transform: translateX(0); }
  .mobile-toggle-btn { display: flex; }
  .language-grid { grid-template-columns: repeat(2, 1fr); }
  
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-text { order: 2; align-items: center; }
  .hero-buttons { justify-content: center; }
  .hero-visual { order: 1; margin-bottom: 2rem; }
  .photo-editorial-frame { transform: none; margin: 0 auto; }
  
  .timeline { padding-left: 0; }
  .timeline-line { left: 20px; }
  .timeline-item { padding-left: 3rem; text-align: left; }
  .timeline-dot { left: 13px; }
}

/* --- Utilities --- */
.hidden { opacity: 0; transform: translateY(20px); transition: 0.8s ease; }
.show { opacity: 1; transform: translateY(0); }
@keyframes blink { 50% { opacity: 0; } }

/* Glitch Effect for Title - Optional */
@keyframes glitch {
  0% { transform: translate(0); }
  20% { transform: translate(-2px, 2px); }
  40% { transform: translate(-2px, -2px); }
  60% { transform: translate(2px, 2px); }
  80% { transform: translate(2px, -2px); }
  100% { transform: translate(0); }
}