/* ==========================================================================
   Interactive Resume - Modern Design System
   resume.jwalaeswar.in | Clean, High-Performance Layout
   ========================================================================== */

:root {
  /* Light Theme Palette */
  --color-bg: #f8fafc;
  --color-bg-subtle: #ffffff;
  --color-bg-card: #ffffff;
  --color-bg-card-hover: #f8fafc;
  
  --color-border: #e2e8f0;
  --color-border-subtle: #cbd5e1;
  
  --color-text-main: #0f172a;
  --color-text-muted: #475569;
  --color-text-light: #64748b;
  
  --color-primary: #2563eb;
  --color-primary-hover: #1d4ed8;
  --color-primary-subtle: rgba(37, 99, 235, 0.08);
  
  --color-accent: #0284c7;
  --color-success: #10b981;
  --color-gold: #f59e0b;
  
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 2px 5px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.1);
  
  --navbar-bg: rgba(255, 255, 255, 0.82);
  --orb-1: rgba(37, 99, 235, 0.07);
  --orb-2: rgba(14, 165, 233, 0.07);
  --orb-3: rgba(139, 92, 246, 0.05);

  --gradient-text: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
}

/* Dark Theme Palette */
[data-theme="dark"] {
  --color-bg: #070a12;
  --color-bg-subtle: #0f172a;
  --color-bg-card: #101828;
  --color-bg-card-hover: #162035;
  
  --color-border: #1e293b;
  --color-border-subtle: #334155;
  
  --color-text-main: #f8fafc;
  --color-text-muted: #94a3b8;
  --color-text-light: #64748b;
  
  --color-primary: #3b82f6;
  --color-primary-hover: #60a5fa;
  --color-primary-subtle: rgba(59, 130, 246, 0.15);
  
  --color-accent: #38bdf8;
  --color-success: #34d399;
  
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 28px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.7);
  
  --navbar-bg: rgba(7, 10, 18, 0.82);
  --orb-1: rgba(37, 99, 235, 0.14);
  --orb-2: rgba(56, 189, 248, 0.12);
  --orb-3: rgba(168, 85, 247, 0.1);

  --gradient-text: linear-gradient(135deg, #ffffff 0%, #93c5fd 100%);
}

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

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

body {
  font-family: var(--font-sans);
  background-color: var(--color-bg);
  color: var(--color-text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
  transition: background-color 0.3s cubic-bezier(0.16, 1, 0.3, 1), color 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.container {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ================= Ambient Animated Mesh Background ================= */
.ambient-mesh {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  animation: float 20s infinite alternate ease-in-out;
}

.orb-1 {
  width: 550px;
  height: 550px;
  background: var(--orb-1);
  top: -120px;
  left: -100px;
}

.orb-2 {
  width: 500px;
  height: 500px;
  background: var(--orb-2);
  top: 40%;
  right: -120px;
  animation-duration: 26s;
  animation-delay: -5s;
}

.orb-3 {
  width: 450px;
  height: 450px;
  background: var(--orb-3);
  bottom: -80px;
  left: 25%;
  animation-duration: 22s;
  animation-delay: -10s;
}

@keyframes float {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(70px, 50px) scale(1.12); }
  100% { transform: translate(-50px, 90px) scale(0.92); }
}

.glow-grid-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(rgba(59, 130, 246, 0.08) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.6;
}

/* Cursor Follower Glow */
.cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.05), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 1;
  transition: transform 0.08s ease-out, opacity 0.3s ease;
  opacity: 0;
}

.app-layout {
  position: relative;
  z-index: 2;
}

/* ================= Navbar ================= */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background-color: var(--navbar-bg);
  border-bottom: 1px solid var(--color-border);
  transition: all 0.3s ease;
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--color-text-main);
  transition: transform 0.2s;
}

.brand:hover {
  transform: scale(1.02);
}

.brand-badge {
  background: var(--color-primary-subtle);
  color: var(--color-primary);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-primary);
  letter-spacing: 0.3px;
  position: relative;
  overflow: hidden;
}

.animate-shimmer::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0% { left: -100%; }
  40%, 100% { left: 100%; }
}

.brand-name {
  font-weight: 800;
  font-size: 1.02rem;
  letter-spacing: -0.4px;
}

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

.nav-link {
  position: relative;
  text-decoration: none;
  color: var(--color-text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 4px 6px;
  transition: color 0.2s;
}

.nav-link:hover, .nav-link.active {
  color: var(--color-primary);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  border-radius: 2px;
  transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link.active::after, .nav-link:hover::after {
  width: 100%;
}

.highlight-link {
  background: var(--color-primary-subtle);
  color: var(--color-primary) !important;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  border: 1px solid rgba(59, 130, 246, 0.25);
  transition: all 0.2s;
}

.highlight-link:hover {
  background: var(--color-primary);
  color: #fff !important;
  transform: translateY(-1px);
}
.highlight-link::after { display: none; }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.theme-toggle {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  color: var(--color-text-main);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.05rem;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-toggle:hover {
  border-color: var(--color-primary);
  transform: rotate(15deg) scale(1.08);
}

/* ================= Buttons ================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-size: 0.86rem;
  font-weight: 600;
  padding: 0.52rem 1.15rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid transparent;
}

.btn-primary {
  background-color: var(--color-primary);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
  background-color: var(--color-primary-hover);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
  transform: translateY(-2px);
}

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

.btn-secondary:hover {
  border-color: var(--color-primary);
  background-color: var(--color-bg-card-hover);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--color-text-muted);
  border-color: var(--color-border-subtle);
}

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

/* ================= Hero Section ================= */
.hero-section {
  padding: 3.5rem 0 1.5rem 0;
}

.hero-top-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
  flex-wrap: wrap;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--color-primary-subtle);
  color: var(--color-primary);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.status-dot {
  width: 7px;
  height: 7px;
  background-color: var(--color-success);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--color-success);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.location-badge {
  font-size: 0.82rem;
  color: var(--color-text-light);
  font-weight: 500;
}

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

.hero-name {
  font-size: 2.45rem;
  font-weight: 900;
  letter-spacing: -0.9px;
  line-height: 1.15;
  margin-bottom: 0.65rem;
}

.hero-subtitle {
  font-size: 1.08rem;
  color: var(--color-text-muted);
  max-width: 820px;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.hero-cta-bar {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* ================= Scroll-Triggered Reveal Animations ================= */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ================= Spotlight Glow Cards ================= */
.spotlight-card {
  position: relative;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.spotlight-card::before {
  content: '';
  position: absolute;
  top: var(--mouse-y, -1000px);
  left: var(--mouse-x, -1000px);
  width: 350px;
  height: 350px;
  background: radial-gradient(circle closest-side, rgba(59, 130, 246, 0.09), transparent);
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 0;
}

.spotlight-card:hover::before {
  opacity: 1;
}

.spotlight-card > * {
  position: relative;
  z-index: 1;
}

/* 3D Tilt Card Physics */
.tilt-card {
  transform-style: preserve-3d;
  transform: perspective(1000px);
}

/* ================= Sections ================= */
.section {
  padding: 2rem 0;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.section-title-wrapper {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.section-icon {
  font-size: 1.35rem;
}

.section-title {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.4px;
  color: var(--color-text-main);
}

.card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.summary-card {
  border-left: 4px solid var(--color-primary);
}

.summary-p {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  line-height: 1.68;
  text-align: justify;
}

.summary-p strong {
  color: var(--color-text-main);
}

/* ================= Skills Filter & Grid ================= */
.skill-filter-tabs {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.filter-tab {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  padding: 5px 13px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-tab:hover {
  border-color: var(--color-primary);
  color: var(--color-text-main);
  transform: translateY(-1px);
}

.filter-tab.active {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.skills-grid-wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.1rem;
}

.skill-category-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.skill-category-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.skill-category-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.skill-category-header h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-text-main);
}

.pill-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.skill-pill {
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 0.78rem;
  font-weight: 500;
  padding: 3.5px 9.5px;
  border-radius: var(--radius-sm);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.skill-pill.highlight {
  background: var(--color-primary-subtle);
  color: var(--color-primary);
  border-color: rgba(59, 130, 246, 0.3);
  font-weight: 600;
}

.skill-pill:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: var(--color-primary-subtle);
  transform: translateY(-2px) scale(1.04);
}

/* ================= Experience Timeline ================= */
.experience-timeline {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.timeline-block {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.company-banner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.company-role {
  font-size: 1.18rem;
  font-weight: 800;
  color: var(--color-text-main);
}

.company-name {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-top: 2px;
}

.company-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.date-badge {
  background: var(--color-primary-subtle);
  color: var(--color-primary);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}

.location-tag {
  font-size: 0.78rem;
  color: var(--color-text-light);
}

/* Project Card */
.project-card {
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.1rem;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.project-card:last-child {
  margin-bottom: 0;
}

.project-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  background: var(--color-bg-card-hover);
}

.project-card.featured-project {
  border-left: 3px solid var(--color-primary);
}

.project-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.4rem;
}

.project-badge {
  font-size: 0.7rem;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--color-accent);
  margin-bottom: 2px;
}

.project-heading {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--color-text-main);
}

.tech-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.5rem 0 0.85rem 0;
}

.tech-tag {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  background: var(--color-bg-card);
  color: var(--color-text-muted);
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid var(--color-border);
}

ul.bullet-list {
  list-style: none;
  padding-left: 0;
}

ul.bullet-list li {
  position: relative;
  padding-left: 16px;
  margin-bottom: 0.45rem;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--color-text-muted);
  text-align: justify;
}

ul.bullet-list li:last-child {
  margin-bottom: 0;
}

ul.bullet-list li::before {
  content: "▪";
  position: absolute;
  left: 0;
  top: -1px;
  color: var(--color-primary);
  font-size: 1rem;
}

ul.bullet-list li strong {
  color: var(--color-text-main);
}

/* ================= Education ================= */
.education-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.1rem;
}

.edu-card {
  display: flex;
  flex-direction: column;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.edu-card:hover {
  transform: translateY(-2px);
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
}

.edu-card.tier1-card {
  border-top: 3px solid var(--color-primary);
}

.edu-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.65rem;
}

.tier-pill {
  background: var(--color-primary-subtle);
  color: var(--color-primary);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  position: relative;
  overflow: hidden;
}

.score-pill {
  background: rgba(16, 185, 129, 0.1);
  color: var(--color-success);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
}

.edu-year {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-text-light);
}

.edu-degree {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--color-text-main);
  margin-bottom: 2px;
}

.edu-school {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  font-weight: 500;
  margin-bottom: 4px;
}

.edu-loc {
  font-size: 0.76rem;
  color: var(--color-text-light);
}

/* ================= Footer ================= */
.site-footer {
  margin-top: 3.5rem;
  border-top: 1px solid var(--color-border);
  padding: 2.5rem 0 2rem 0;
  background: var(--color-bg-subtle);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.footer-title {
  font-size: 1.2rem;
  font-weight: 800;
}

.footer-desc {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  margin-top: 2px;
}

.footer-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.footer-sub {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--color-text-light);
  border-top: 1px solid var(--color-border);
  padding-top: 1rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.footer-sub a {
  color: var(--color-primary);
  text-decoration: none;
}

/* ================= Toast Notification ================= */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #0f172a;
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* ================= Print Layout ================= */
@media print {
  body {
    background: #ffffff !important;
    color: #0f172a !important;
    font-size: 9pt;
    line-height: 1.36;
  }

  .no-print, .ambient-mesh, .cursor-glow {
    display: none !important;
  }

  .container {
    max-width: 100% !important;
    padding: 0 !important;
  }

  .card, .timeline-block, .project-card {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin-bottom: 8px !important;
    background: transparent !important;
  }

  .timeline-block, .project-card {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}

/* ================= Responsive ================= */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  .hero-name {
    font-size: 1.85rem;
  }
  .company-meta {
    align-items: flex-start;
  }
  .footer-content, .footer-sub {
    flex-direction: column;
    align-items: flex-start;
  }
}
