/* ==========================================================================
   CV LÝ CÔNG MINH - DESIGN SYSTEM & STYLESHEET
   Vanilla CSS with Theme Variables, Glassmorphism & Print Optimization
   ========================================================================== */

/* -----------------------------
   1. CSS VARIABLES (DARK & LIGHT)
   ----------------------------- */
:root {
  /* Fonts */
  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 0.4s cubic-bezier(0.16, 1, 0.3, 1);

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --radius-full: 9999px;
}

/* DARK THEME (DEFAULT) */
[data-theme="dark"] {
  --bg-page: #0b0f19;
  --bg-card: rgba(18, 24, 38, 0.75);
  --bg-card-hover: rgba(24, 32, 51, 0.85);
  --bg-sidebar: rgba(14, 20, 33, 0.85);
  --bg-input: #111827;
  --bg-subtle: rgba(255, 255, 255, 0.04);
  --bg-badge: rgba(99, 102, 241, 0.12);

  --border-color: rgba(255, 255, 255, 0.08);
  --border-light: rgba(255, 255, 255, 0.04);
  --border-highlight: rgba(99, 102, 241, 0.35);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-accent: #818cf8;

  --accent-primary: #6366f1;
  --accent-secondary: #3b82f6;
  --accent-gradient: linear-gradient(135deg, #6366f1 0%, #3b82f6 50%, #06b6d4 100%);
  --accent-glow: rgba(99, 102, 241, 0.25);

  --success: #10b981;
  --success-glow: rgba(16, 185, 129, 0.2);
  --tag-bg: rgba(99, 102, 241, 0.1);
  --tag-border: rgba(99, 102, 241, 0.2);
  --tag-text: #a5b4fc;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.2);

  --backdrop-blur: blur(14px);
}

/* LIGHT THEME */
[data-theme="light"] {
  --bg-page: #f1f5f9;
  --bg-card: rgba(255, 255, 255, 0.9);
  --bg-card-hover: #ffffff;
  --bg-sidebar: rgba(248, 250, 252, 0.95);
  --bg-input: #e2e8f0;
  --bg-subtle: rgba(15, 23, 42, 0.03);
  --bg-badge: rgba(79, 70, 229, 0.08);

  --border-color: rgba(15, 23, 42, 0.09);
  --border-light: rgba(15, 23, 42, 0.05);
  --border-highlight: rgba(79, 70, 229, 0.3);

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-accent: #4f46e5;

  --accent-primary: #4f46e5;
  --accent-secondary: #2563eb;
  --accent-gradient: linear-gradient(135deg, #4f46e5 0%, #2563eb 50%, #0284c7 100%);
  --accent-glow: rgba(79, 70, 229, 0.15);

  --success: #059669;
  --success-glow: rgba(5, 150, 105, 0.15);
  --tag-bg: rgba(79, 70, 229, 0.07);
  --tag-border: rgba(79, 70, 229, 0.18);
  --tag-text: #4338ca;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 18px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.1);
  --shadow-glow: 0 0 25px rgba(79, 70, 229, 0.12);

  --backdrop-blur: blur(14px);
}

/* -----------------------------
   2. GLOBAL RESETS & BASE
   ----------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 14.5px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  transition: background-color var(--transition-slow), color var(--transition-slow);
}

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

/* Ambient Ambient Glow Circles */
.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.18;
  pointer-events: none;
  z-index: 0;
  transition: opacity var(--transition-slow);
}

.bg-glow-1 {
  width: 500px;
  height: 500px;
  top: -100px;
  right: -50px;
  background: radial-gradient(circle, var(--accent-primary), transparent 70%);
}

.bg-glow-2 {
  width: 450px;
  height: 450px;
  bottom: 50px;
  left: -100px;
  background: radial-gradient(circle, #06b6d4, transparent 70%);
}

/* -----------------------------
   3. TOP ACTION BAR (NO-PRINT)
   ----------------------------- */
.action-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--bg-card);
  backdrop-filter: var(--backdrop-blur);
  -webkit-backdrop-filter: var(--backdrop-blur);
  border-bottom: 1px solid var(--border-color);
  padding: 0.75rem 1.5rem;
  box-shadow: var(--shadow-sm);
}

.action-bar-container {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.bar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.55rem;
  border-radius: var(--radius-sm);
  background: var(--accent-gradient);
  color: #ffffff;
  box-shadow: var(--shadow-glow);
}

.brand-name {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

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

.status-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem;
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-secondary);
}

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

@keyframes pulse-dot {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.5;
    transform: scale(0.85);
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-family: var(--font-main);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-normal);
  white-space: nowrap;
}

.btn svg {
  width: 15px;
  height: 15px;
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius-md);
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

.btn-icon:hover {
  background-color: var(--bg-card-hover);
  border-color: var(--border-highlight);
  color: var(--text-accent);
}

[data-theme="dark"] .sun-icon {
  display: block;
}

[data-theme="dark"] .moon-icon {
  display: none;
}

[data-theme="light"] .sun-icon {
  display: none;
}

[data-theme="light"] .moon-icon {
  display: block;
}

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

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

.btn-primary {
  background: var(--accent-gradient);
  color: #ffffff;
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--accent-glow);
  filter: brightness(1.08);
}

.btn-primary:active {
  transform: translateY(0);
}

/* -----------------------------
   4. RESUME WRAPPER & PAGE
   ----------------------------- */
.resume-wrapper {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 2rem auto 4rem auto;
  padding: 0 1.25rem;
}

.resume-page {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 2rem;
  background-color: var(--bg-card);
  backdrop-filter: var(--backdrop-blur);
  -webkit-backdrop-filter: var(--backdrop-blur);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

/* -----------------------------
   5. LEFT SIDEBAR
   ----------------------------- */
.resume-sidebar {
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  padding: 2.25rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* AVATAR PLACEHOLDER (BLANK / KHUNG TRỐNG) */
.avatar-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.avatar-card {
  width: 160px;
  height: 200px;
  /* Standard 3x4 / 4x6 CV proportion */
  border-radius: var(--radius-lg);
  border: 2px dashed var(--border-highlight);
  background-color: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  transition: all var(--transition-normal);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.05);
}

.avatar-card:hover {
  border-color: var(--text-accent);
  background-color: var(--bg-badge);
}

.avatar-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1rem 0.5rem;
  gap: 0.75rem;
}

.avatar-icon-box {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all var(--transition-normal);
}

.avatar-user-icon {
  width: 32px;
  height: 32px;
  stroke-width: 1.5;
}

.avatar-card:hover .avatar-icon-box {
  color: var(--text-accent);
  border-color: var(--border-highlight);
  transform: scale(1.05);
}

.avatar-meta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.avatar-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.avatar-hint {
  font-size: 0.65rem;
  color: var(--text-muted);
  line-height: 1.3;
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-img.hidden {
  display: none;
}

.avatar-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-main);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: 1px dashed var(--border-color);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.avatar-action-btn:hover {
  color: var(--text-accent);
  border-color: var(--border-highlight);
  background-color: var(--bg-subtle);
}

.avatar-action-btn svg {
  width: 13px;
  height: 13px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Sidebar Titles */
.sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.sidebar-title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.01em;
  text-transform: uppercase;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-title svg {
  width: 17px;
  height: 17px;
  color: var(--text-accent);
}

/* Contact List */
.contact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  position: relative;
  padding: 0.45rem 0.55rem;
  border-radius: var(--radius-sm);
  transition: background-color var(--transition-fast);
}

.contact-item:hover {
  background-color: var(--bg-subtle);
}

.contact-icon {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-accent);
  flex-shrink: 0;
}

.contact-icon svg {
  width: 14px;
  height: 14px;
}

.contact-details {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex: 1;
}

.contact-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 600;
}

.contact-value {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.contact-value.linkable:hover {
  color: var(--text-accent);
  text-decoration: underline;
}

.copy-mini-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.3rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.4;
  transition: all var(--transition-fast);
}

.contact-item:hover .copy-mini-btn {
  opacity: 1;
}

.copy-mini-btn:hover {
  color: var(--text-accent);
  background-color: var(--bg-card);
}

.copy-mini-btn svg {
  width: 13px;
  height: 13px;
}

/* Education Card */
.education-card {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
}

.edu-time {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-accent);
}

.edu-school {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}

.edu-sub {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.edu-degree {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 0.2rem;
}

.edu-score-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  background-color: var(--bg-badge);
  border: 1px solid var(--border-highlight);
  color: var(--text-accent);
  padding: 0.25rem 0.55rem;
  border-radius: var(--radius-sm);
  width: fit-content;
  margin: 0.25rem 0;
}

.edu-score-badge svg {
  width: 13px;
  height: 13px;
}

.edu-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.edu-courses {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.4rem;
}

.edu-chip {
  font-size: 0.68rem;
  padding: 0.15rem 0.45rem;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
}

.edu-highlights {
  list-style: none;
  font-size: 0.74rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.edu-highlights li {
  position: relative;
  padding-left: 1rem;
}

.edu-highlights li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--text-accent);
}

/* Certifications List */
.cert-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.cert-item {
  display: flex;
  gap: 0.7rem;
  padding: 0.55rem 0.65rem;
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.cert-item:hover {
  border-color: var(--border-highlight);
  background-color: var(--bg-card-hover);
}

.cert-item.highlight-award {
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.05);
}

.cert-year {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-accent);
  padding-top: 0.1rem;
}

.highlight-award .cert-year {
  color: #f59e0b;
}

.cert-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.cert-info strong {
  font-size: 0.78rem;
  color: var(--text-primary);
  line-height: 1.3;
}

.cert-code {
  font-size: 0.68rem;
  color: var(--text-muted);
}

/* Languages & Progress */
.lang-box {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.lang-row {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.lang-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 500;
}

.lang-level {
  color: var(--text-muted);
  font-size: 0.72rem;
}

.progress-bar {
  width: 100%;
  height: 5px;
  background-color: var(--bg-card);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--accent-gradient);
  border-radius: var(--radius-full);
}

/* Quick Stats */
.quick-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.stat-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.5rem 0.25rem;
}

.stat-num {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-accent);
}

.stat-txt {
  font-size: 0.62rem;
  color: var(--text-muted);
  line-height: 1.2;
  margin-top: 0.15rem;
}

/* -----------------------------
   6. RIGHT MAIN CONTENT
   ----------------------------- */
.resume-main {
  padding: 2.25rem 2.5rem 2.5rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 2.25rem;
}

/* Profile Header */
.profile-header {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1.75rem;
}

.title-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.35rem;
}

.pill-role {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.55rem;
  background-color: var(--bg-badge);
  border: 1px solid var(--border-highlight);
  color: var(--text-accent);
  border-radius: var(--radius-sm);
}

.pill-spec {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.candidate-name {
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.candidate-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 0.25rem;
}

.summary-box {
  position: relative;
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-left: 3px solid var(--accent-primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 1rem 1.25rem 1rem 3rem;
}

.summary-quote-icon {
  position: absolute;
  top: 0.9rem;
  left: 0.9rem;
  color: var(--text-accent);
  opacity: 0.45;
}

.summary-quote-icon svg {
  width: 22px;
  height: 22px;
}

.summary-text {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

.summary-text strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* Main Section Heading */
.main-section {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

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

.heading-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: var(--shadow-glow);
  flex-shrink: 0;
}

.heading-icon svg {
  width: 17px;
  height: 17px;
}

.section-heading h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.section-heading-with-filter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Project Filter Tabs */
.filter-tabs {
  display: flex;
  gap: 0.35rem;
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-color);
  padding: 0.25rem;
  border-radius: var(--radius-md);
}

.filter-btn {
  background: transparent;
  border: none;
  font-family: var(--font-main);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-btn:hover {
  color: var(--text-primary);
}

.filter-btn.active {
  background-color: var(--bg-card);
  color: var(--text-accent);
  box-shadow: var(--shadow-sm);
}

/* Skills Grid */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.skill-category-card {
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: all var(--transition-fast);
}

.skill-category-card:hover {
  border-color: var(--border-highlight);
  background-color: var(--bg-card-hover);
  transform: translateY(-2px);
}

.cat-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-primary);
}

.cat-header svg {
  width: 16px;
  height: 16px;
  color: var(--text-accent);
}

.cat-header h3 {
  font-size: 0.88rem;
  font-weight: 700;
}

.cat-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag {
  font-size: 0.74rem;
  font-weight: 500;
  padding: 0.25rem 0.55rem;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.tag:hover {
  color: var(--text-primary);
  border-color: var(--border-highlight);
}

.tag.tag-accent {
  background-color: var(--tag-bg);
  border-color: var(--tag-border);
  color: var(--tag-text);
  font-weight: 600;
}

/* Timeline (Work Experience) */
.timeline {
  display: flex;
  flex-direction: column;
  position: relative;
  border-left: 2px solid var(--border-color);
  margin-left: 0.75rem;
  padding-left: 1.5rem;
}

.timeline-item {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.timeline-marker {
  position: absolute;
  left: -1.95rem;
  top: 0.35rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent-gradient);
  border: 3px solid var(--bg-card);
  box-shadow: 0 0 10px var(--accent-glow);
}

.timeline-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.role-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.company-badge {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 0.15rem;
}

.company-name {
  font-weight: 600;
  color: var(--text-accent);
}

.timeline-date {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  background-color: var(--bg-subtle);
  padding: 0.25rem 0.55rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.timeline-date svg {
  width: 13px;
  height: 13px;
}

.timeline-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.role-overview {
  font-size: 0.84rem;
  color: var(--text-secondary);
}

.role-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  font-size: 0.84rem;
  color: var(--text-secondary);
}

.role-bullets li {
  position: relative;
  padding-left: 1.15rem;
  line-height: 1.55;
}

.role-bullets li::before {
  content: '▪';
  position: absolute;
  left: 0;
  color: var(--text-accent);
  font-size: 1rem;
  line-height: 1.2;
}

.role-bullets strong {
  color: var(--text-primary);
}

.tech-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.25rem;
}

.tech-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
}

/* Projects Grid */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.project-card {
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  transition: all var(--transition-normal);
}

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

.project-card.fade-out {
  display: none;
}

.project-meta-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.project-type-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
}

.badge-fullstack {
  background-color: rgba(99, 102, 241, 0.12);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.badge-backend {
  background-color: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-tool {
  background-color: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.project-time {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

.project-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}

.project-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-top: 0.25rem;
}

.project-highlights {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.65rem 0.8rem;
  background-color: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
}

.highlight-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.highlight-item svg {
  width: 14px;
  height: 14px;
  color: var(--success);
  margin-top: 0.2rem;
  flex-shrink: 0;
}

.highlight-item strong {
  color: var(--text-primary);
}

.project-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-light);
}

.tech-stack-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.mini-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 0.18rem 0.48rem;
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
}

.project-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius-sm);
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  transition: all var(--transition-fast);
}

.link-btn:hover {
  border-color: var(--border-highlight);
  color: var(--text-accent);
}

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

.link-btn.primary:hover {
  filter: brightness(1.1);
}

.link-btn svg {
  width: 12px;
  height: 12px;
}

/* Activities Grid */
.activities-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.9rem;
}

.activity-box {
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.activity-top {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--text-primary);
  font-size: 0.84rem;
}

.activity-top svg {
  width: 15px;
  height: 15px;
  color: var(--text-accent);
}

.activity-box p {
  font-size: 0.76rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

/* Footer & Signature */
.cv-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  margin-top: 0.5rem;
}

.footer-notes {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.footer-sign {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  gap: 0.15rem;
}

.footer-sign span {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.footer-sign strong {
  font-size: 1.1rem;
  color: var(--text-primary);
  font-family: var(--font-main);
  letter-spacing: -0.01em;
}

/* -----------------------------
   7. TOAST NOTIFICATION
   ----------------------------- */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background-color: var(--bg-card);
  backdrop-filter: var(--backdrop-blur);
  -webkit-backdrop-filter: var(--backdrop-blur);
  border: 1px solid var(--border-highlight);
  color: var(--text-primary);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  font-weight: 600;
  z-index: 999;
  transform: translateY(100px);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.toast-icon {
  width: 17px;
  height: 17px;
  color: var(--success);
}

/* -----------------------------
   8. RESPONSIVE DESIGN (MOBILE / TABLET)
   ----------------------------- */
@media (max-width: 960px) {
  .resume-page {
    grid-template-columns: 1fr;
  }

  .resume-sidebar {
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    padding: 1.75rem;
  }

  .resume-main {
    padding: 1.75rem;
  }

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

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

  .status-pill {
    display: none;
  }
}

@media (max-width: 640px) {
  .action-bar {
    padding: 0.6rem 1rem;
  }

  .brand-name {
    display: none;
  }

  .candidate-name {
    font-size: 1.85rem;
  }

  .candidate-title {
    font-size: 1.05rem;
  }

  .filter-tabs {
    width: 100%;
    overflow-x: auto;
  }

  .cv-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .footer-sign {
    align-items: flex-start;
    text-align: left;
  }
}

/* -----------------------------
   9. PRINT STYLESHEET (@media print)
   Optimized for high-end A4 / PDF export
   ----------------------------- */
@media print {

  /* Hide interactive web elements */
  .no-print,
  .bg-glow,
  .action-bar,
  .toast,
  .avatar-action-btn,
  .copy-mini-btn,
  .filter-tabs,
  .project-links {
    display: none !important;
  }

  /* Reset body & background */
  html,
  body {
    background: #ffffff !important;
    color: #111827 !important;
    font-size: 11.5px !important;
    line-height: 1.45 !important;
  }

  .resume-wrapper {
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .resume-page {
    display: grid !important;
    grid-template-columns: 260px 1fr !important;
    gap: 1.5rem !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    background: #ffffff !important;
  }

  .resume-sidebar {
    background-color: #f8fafc !important;
    border-right: 1px solid #e2e8f0 !important;
    padding: 1rem !important;
    gap: 1.25rem !important;
  }

  .resume-main {
    padding: 1rem 1rem 1rem 0 !important;
    gap: 1.25rem !important;
  }

  /* Avatar Card in Print */
  .avatar-card {
    width: 120px !important;
    height: 155px !important;
    border: 1.5px dashed #94a3b8 !important;
    background-color: #ffffff !important;
  }

  .avatar-user-icon {
    width: 24px !important;
    height: 24px !important;
  }

  .avatar-label {
    color: #475569 !important;
    font-size: 0.6rem !important;
  }

  .avatar-hint {
    color: #64748b !important;
    font-size: 0.58rem !important;
  }

  /* Text & Headers */
  .candidate-name {
    font-size: 2rem !important;
    color: #1e1b4b !important;
    -webkit-text-fill-color: initial !important;
    background: none !important;
  }

  .candidate-title {
    font-size: 1.1rem !important;
    color: #4338ca !important;
  }

  .summary-box {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-left: 3px solid #4f46e5 !important;
    padding: 0.75rem 0.9rem !important;
  }

  .summary-text {
    font-size: 0.8rem !important;
    color: #334155 !important;
  }

  .skills-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.65rem !important;
  }

  .skill-category-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    padding: 0.6rem !important;
    break-inside: avoid;
  }

  .timeline-item {
    break-inside: avoid;
  }

  .project-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: none !important;
    padding: 0.85rem !important;
    break-inside: avoid;
  }

  .project-highlights {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    padding: 0.5rem !important;
  }

  .activities-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 0.5rem !important;
  }

  .activity-box {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    padding: 0.6rem !important;
  }

  .tag,
  .mini-tag,
  .tech-tag {
    background: #f1f5f9 !important;
    border: 1px solid #cbd5e1 !important;
    color: #334155 !important;
  }

  .tag.tag-accent {
    background: #e0e7ff !important;
    color: #3730a3 !important;
    border-color: #c7d2fe !important;
  }
}