/* ==========================================================================
   CV PRO DESIGN SYSTEM - MODERN, SLEEK, GLASSMORPHIC & PRINT-PERFECT
   ========================================================================== */

:root {
  /* Color Palette - Dark Mode Default */
  --bg-body: #0a0e17;
  --bg-surface: #111827;
  --bg-card: rgba(17, 24, 39, 0.7);
  --bg-card-hover: rgba(31, 41, 55, 0.85);
  --bg-glass: rgba(255, 255, 255, 0.04);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(99, 102, 241, 0.4);

  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-dim: #6b7280;

  --accent-primary: #3b82f6;
  --accent-secondary: #8b5cf6;
  --accent-tertiary: #ec4899;
  --accent-gradient: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 50%, #ec4899 100%);
  --accent-gradient-subtle: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
  --glow-primary: rgba(59, 130, 246, 0.35);

  --success: #10b981;
  --success-glow: rgba(16, 185, 129, 0.4);

  /* Typography */
  --font-main: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Outfit', var(--font-main);

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 8px 24px -4px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 20px 40px -12px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 35px -5px var(--glow-primary);

  /* Dimensions & Transitions */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-full: 9999px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Theme Variables */
[data-theme="light"] {
  --bg-body: #f8fafc;
  --bg-surface: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-card-hover: rgba(241, 245, 249, 0.95);
  --bg-glass: rgba(0, 0, 0, 0.02);
  --border-color: rgba(0, 0, 0, 0.08);
  --border-focus: rgba(59, 130, 246, 0.5);

  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #94a3b8;

  --accent-primary: #2563eb;
  --accent-secondary: #7c3aed;
  --accent-tertiary: #db2777;
  --accent-gradient: linear-gradient(135deg, #2563eb 0%, #7c3aed 50%, #db2777 100%);
  --accent-gradient-subtle: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(124, 58, 237, 0.08) 100%);
  --glow-primary: rgba(37, 99, 235, 0.2);

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 20px 35px -10px rgba(0, 0, 0, 0.12);
}

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

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

body {
  font-family: var(--font-main);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
  -webkit-font-smoothing: antialiased;
}

/* Background Ambient Glow Orbs */
.bg-ambient {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.25;
  transition: opacity 0.5s ease;
}

.orb-1 {
  width: 500px;
  height: 500px;
  background: var(--accent-primary);
  top: -100px;
  left: -150px;
  animation: floatOrb 18s ease-in-out infinite alternate;
}

.orb-2 {
  width: 600px;
  height: 600px;
  background: var(--accent-secondary);
  top: 40%;
  right: -200px;
  animation: floatOrb 22s ease-in-out infinite alternate-reverse;
}

.orb-3 {
  width: 450px;
  height: 450px;
  background: var(--accent-tertiary);
  bottom: -100px;
  left: 20%;
  animation: floatOrb 20s ease-in-out infinite alternate;
}

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, 30px) scale(1.08); }
  100% { transform: translate(-30px, -40px) scale(0.95); }
}

/* Typography Helpers */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

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

/* Layout Container */
.cv-container {
  max-width: 1060px;
  margin: 40px auto;
  padding: 0 24px 80px;
  position: relative;
}

/* Floating Actions Header */
.action-bar {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-bottom: 24px;
  position: sticky;
  top: 20px;
  z-index: 100;
}

.btn-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.btn-action:hover {
  transform: translateY(-2px);
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-md), 0 0 15px var(--glow-primary);
  color: var(--accent-primary);
}

.btn-action.btn-primary {
  background: var(--accent-gradient);
  color: #ffffff;
  border: none;
}

.btn-action.btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

/* Hero Section */
.hero-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 48px;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 40px;
  align-items: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  margin-bottom: 32px;
  transition: var(--transition);
}

.hero-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--accent-gradient);
}

/* Avatar Styling */
.avatar-wrapper {
  position: relative;
  width: 190px;
  height: 190px;
  margin: 0 auto;
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 3px solid rgba(255, 255, 255, 0.15);
  box-shadow: var(--shadow-md);
  position: relative;
  z-index: 2;
  transition: var(--transition);
}

.avatar-wrapper:hover .avatar-img {
  transform: scale(1.03);
}

.avatar-glow {
  position: absolute;
  inset: -6px;
  border-radius: calc(var(--radius-md) + 6px);
  background: var(--accent-gradient);
  z-index: 1;
  opacity: 0.7;
  filter: blur(12px);
  transition: var(--transition);
}

.avatar-wrapper:hover .avatar-glow {
  opacity: 1;
  filter: blur(18px);
}

/* Live Status Badge */
.status-badge {
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  z-index: 3;
  box-shadow: var(--shadow-sm);
}

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

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Hero Content */
.hero-content {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.hero-name {
  font-size: 2.5rem;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.hero-title {
  font-size: 1.25rem;
  color: var(--text-muted);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.badge-tag {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: var(--accent-gradient-subtle);
  color: var(--accent-primary);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.hero-meta-list {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 6px;
  list-style: none;
}

.hero-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.9rem;
  text-decoration: none;
  transition: var(--transition);
}

.hero-meta-item:hover {
  color: var(--accent-primary);
}

.hero-meta-item svg {
  width: 17px;
  height: 17px;
  stroke: var(--accent-primary);
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 10px;
  flex-wrap: wrap;
}

/* Highlights Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 22px 18px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-md), 0 0 20px var(--glow-primary);
}

.stat-number {
  font-size: 2.2rem;
  font-weight: 800;
  font-family: var(--font-heading);
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Two Column Layout */
.main-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 32px;
}

/* Section Cards Common */
.section-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 32px;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.section-card:hover {
  border-color: rgba(255, 255, 255, 0.14);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-color);
}

.section-title {
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title svg {
  width: 24px;
  height: 24px;
  stroke: var(--accent-primary);
}

/* Timeline Components */
.timeline {
  position: relative;
  padding-left: 28px;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 7px;
  width: 2px;
  background: linear-gradient(180deg, var(--accent-primary) 0%, rgba(99, 102, 241, 0.2) 100%);
}

.timeline-item {
  position: relative;
  margin-bottom: 32px;
}

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

.timeline-dot {
  position: absolute;
  left: -28px;
  top: 5px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 3px solid var(--accent-primary);
  box-shadow: 0 0 10px var(--glow-primary);
  transition: var(--transition);
}

.timeline-item:hover .timeline-dot {
  background: var(--accent-primary);
  transform: scale(1.2);
}

.timeline-role {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.timeline-company {
  font-size: 0.95rem;
  color: var(--accent-primary);
  font-weight: 600;
  margin-bottom: 8px;
}

.timeline-time {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-dim);
  background: var(--bg-glass);
  padding: 2px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
}

.timeline-desc {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 12px;
}

.timeline-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.timeline-bullets li {
  font-size: 0.9rem;
  color: var(--text-muted);
  position: relative;
  padding-left: 20px;
}

.timeline-bullets li::before {
  content: '▹';
  position: absolute;
  left: 0;
  color: var(--accent-primary);
  font-weight: bold;
}

.timeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-glass);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.tag:hover {
  color: var(--text-main);
  border-color: var(--accent-primary);
  background: var(--accent-gradient-subtle);
}

/* Projects Cards */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.project-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 22px;
  transition: var(--transition);
  position: relative;
}

.project-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-md), 0 0 20px var(--glow-primary);
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

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

.project-links {
  display: flex;
  gap: 10px;
}

.project-link {
  color: var(--text-muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: var(--transition);
}

.project-link:hover {
  color: var(--accent-primary);
  transform: scale(1.15);
}

.project-link svg {
  width: 18px;
  height: 18px;
}

.project-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

/* Skills Section in Sidebar */
.skill-group {
  margin-bottom: 24px;
}

.skill-group:last-child {
  margin-bottom: 0;
}

.skill-group-title {
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.skill-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.skill-bar-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.skill-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  font-weight: 600;
}

.skill-progress {
  width: 100%;
  height: 7px;
  background: var(--bg-glass);
  border-radius: var(--radius-full);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.skill-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--accent-gradient);
  position: relative;
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Certification & Education Cards */
.sidebar-item {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

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

.sidebar-item-sub {
  font-size: 0.85rem;
  color: var(--accent-primary);
  font-weight: 600;
  margin-bottom: 4px;
}

.sidebar-item-date {
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* Language Meter */
.lang-badge {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  font-size: 0.88rem;
  font-weight: 500;
}

.lang-level {
  font-size: 0.78rem;
  color: var(--accent-primary);
  font-weight: 700;
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  padding: 14px 22px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg), 0 0 25px var(--glow-primary);
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  transform: translateY(100px);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 1000;
}

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

/* Footer CTA */
.footer-cta {
  text-align: center;
  padding: 40px;
  background: var(--accent-gradient-subtle);
  border: 1px solid var(--border-focus);
  border-radius: var(--radius-lg);
  margin-top: 32px;
}

.footer-cta h3 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.footer-cta p {
  color: var(--text-muted);
  max-width: 550px;
  margin: 0 auto 20px;
  font-size: 0.95rem;
}

/* ==========================================================================
   RESPONSIVE DESIGN (TABLET & MOBILE)
   ========================================================================== */
@media (max-width: 900px) {
  .hero-card {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 36px 24px;
    gap: 28px;
  }

  .hero-title {
    justify-content: center;
  }

  .hero-meta-list {
    justify-content: center;
  }

  .hero-actions {
    justify-content: center;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .main-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .cv-container {
    padding: 0 16px 60px;
    margin-top: 20px;
  }

  .action-bar {
    justify-content: center;
  }

  .hero-name {
    font-size: 2rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .section-card {
    padding: 24px 18px;
  }

  .timeline {
    padding-left: 20px;
  }

  .timeline-dot {
    left: -20px;
  }
}

/* ==========================================================================
   PRINT / PDF EXPORT OPTIMIZATIONS (@media print)
   ========================================================================== */
@media print {
  @page {
    margin: 12mm 15mm;
    size: A4 portrait;
  }

  body {
    background: #ffffff !important;
    color: #111827 !important;
    font-size: 10pt;
    line-height: 1.45;
  }

  .bg-ambient,
  .action-bar,
  .footer-cta,
  .toast,
  .project-links {
    display: none !important;
  }

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

  .hero-card,
  .section-card,
  .stat-card,
  .project-card {
    background: transparent !important;
    backdrop-filter: none !important;
    border: 1px solid #e5e7eb !important;
    box-shadow: none !important;
    page-break-inside: avoid;
    padding: 16px !important;
    margin-bottom: 16px !important;
  }

  .hero-card {
    grid-template-columns: 130px 1fr !important;
    gap: 20px !important;
  }

  .avatar-wrapper {
    width: 120px !important;
    height: 120px !important;
  }

  .status-badge {
    display: none !important;
  }

  .hero-name {
    font-size: 1.8rem !important;
    color: #111827 !important;
  }

  .gradient-text {
    background: none !important;
    -webkit-text-fill-color: #111827 !important;
    color: #111827 !important;
  }

  .stat-number {
    font-size: 1.5rem !important;
    -webkit-text-fill-color: #2563eb !important;
  }

  .main-grid {
    grid-template-columns: 1fr 280px !important;
    gap: 16px !important;
  }

  .timeline-item {
    page-break-inside: avoid;
    margin-bottom: 18px !important;
  }

  .skill-fill {
    background: #2563eb !important;
  }
}
