/* ============================================================
   HOW IS MY CV — Design System
   A dark-mode, premium, modern CSS design system
   ============================================================ */

/* ─── Google Fonts ─── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* ─── Design Tokens ─── */
:root {
  /* Backgrounds */
  --bg-primary: #060a14;
  --bg-secondary: #0c1322;
  --bg-elevated: #131b2e;
  --bg-surface: #1a2540;

  /* Text */
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-inverse: #0f172a;

  /* Accent */
  --accent: #3B82F6;
  --accent-hover: #60a5fa;
  --accent-glow: rgba(59, 130, 246, 0.3);
  --accent-subtle: rgba(59, 130, 246, 0.1);

  /* Semantic */
  --success: #10b981;
  --error: #ef4444;
  --warning: #f59e0b;
  --star: #fbbf24;

  /* Borders */
  --border: rgba(148, 163, 184, 0.1);
  --border-hover: rgba(148, 163, 184, 0.2);

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.15);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ─── Custom Scrollbar ─── */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--bg-surface);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--bg-surface) var(--bg-primary);
}

/* ─── Selection ─── */
::selection {
  background: var(--accent);
  color: #fff;
}

::-moz-selection {
  background: var(--accent);
  color: #fff;
}

/* ─── Typography ─── */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.3;
  letter-spacing: -0.02em;
}

h1 {
  font-size: 2.5rem;
  font-weight: 700;
}

h2 {
  font-size: 1.75rem;
  font-weight: 600;
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
}

p {
  color: var(--text-secondary);
}

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

a:hover {
  color: var(--accent-hover);
}

code, .mono {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

/* ─── Container ─── */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: 72px;
  background: rgba(6, 10, 20, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 24px;
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  white-space: nowrap;
  transition: opacity var(--transition-fast);
}

.nav-logo:hover {
  opacity: 0.9;
  color: var(--text-primary);
}

.logo-accent {
  background: linear-gradient(135deg, var(--accent), #93c5fd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  position: relative;
  padding: 8px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: color var(--transition-base), background var(--transition-base);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 24px;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
  transition: transform var(--transition-base);
}

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

.nav-link:hover::after {
  transform: translateX(-50%) scaleX(1);
}

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

.nav-link.active::after {
  transform: translateX(-50%) scaleX(1);
}

.nav-auth {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
  position: relative;
}

.nav-user:hover {
  background: var(--bg-elevated);
}

.nav-user-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
}

/* Mobile nav toggle */
.nav-mobile-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  z-index: 1001;
}

.nav-mobile-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 1px;
  transition: transform var(--transition-base), opacity var(--transition-base);
}

.nav-mobile-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-mobile-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-mobile-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: all var(--transition-base);
  -webkit-user-select: none;
  user-select: none;
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

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

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 24px var(--accent-glow), var(--shadow-md);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: scale(0.98) translateY(0);
  box-shadow: none;
}

.btn-secondary {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.btn-secondary:hover {
  background: var(--accent-subtle);
  border-color: var(--accent-hover);
  box-shadow: var(--shadow-glow);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 8px 16px;
}

.btn-ghost:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.btn-ghost.active {
  background: var(--accent-subtle);
  color: var(--accent);
}

.btn-danger {
  background: var(--error);
  color: #fff;
}

.btn-danger:hover {
  background: #dc2626;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.8rem;
}

.btn-lg {
  padding: 16px 32px;
  font-size: 1rem;
}

.btn-icon {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: var(--radius-md);
}

.btn:disabled,
.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* ============================================================
   FORMS & INPUTS
   ============================================================ */
.input {
  width: 100%;
  padding: 12px 16px;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  color: var(--text-primary);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
  outline: none;
}

.input:hover {
  border-color: var(--border-hover);
  background: rgba(255, 255, 255, 0.03);
}

.input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-subtle);
  background: var(--bg-surface);
}

.input::placeholder {
  color: var(--text-muted);
}

textarea.input {
  line-height: 1.5;
  min-height: 100px;
}

/* ============================================================
   PAGE HEADER
   ============================================================ */
.page-header {
  padding-top: 120px;
  margin-bottom: 48px;
}

.page-header h1 {
  margin-bottom: 8px;
}

.page-header p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 560px;
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
  position: relative;
  padding-top: 140px;
  padding-bottom: 72px;
  overflow: hidden;
}

/* Decorative gradient orbs */
.hero::before {
  content: '';
  position: absolute;
  top: -10%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 500px;
  background: radial-gradient(ellipse at center, rgba(59, 130, 246, 0.15) 0%, rgba(59, 130, 246, 0.05) 40%, transparent 70%);
  pointer-events: none;
  animation: float 8s ease-in-out infinite;
}

.hero::after {
  content: '';
  position: absolute;
  top: 20%;
  right: 10%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(147, 197, 253, 0.08) 0%, transparent 60%);
  pointer-events: none;
  animation: float 6s ease-in-out infinite reverse;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  animation: fadeIn 0.8s ease forwards;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent), #93c5fd, #60a5fa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin: 0 auto 40px;
  max-width: 520px;
  animation: fadeIn 0.8s ease 0.15s forwards;
  opacity: 0;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 24px;
  animation: fadeIn 0.8s ease 0.3s forwards;
  opacity: 0;
}

.hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 36px;
  background: rgba(12, 19, 34, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.hero-stat:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-glow);
}

.hero-stat-number {
  font-size: 2.25rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), #93c5fd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-family: 'JetBrains Mono', monospace;
}

.hero-stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 4px;
}

/* ============================================================
   FEED
   ============================================================ */
.feed-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.feed-header h2 {
  font-size: 1.5rem;
}

.feed-sort {
  display: flex;
  gap: 4px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 4px;
  border: 1px solid var(--border);
}

.feed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}

.feed-footer {
  text-align: center;
  padding: 48px 0;
}

/* ============================================================
   CV CARD
   ============================================================ */
.cv-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: transform 300ms var(--transition-slow),
              box-shadow 300ms ease,
              border-color 300ms ease;
  animation: fadeIn 0.5s ease forwards;
  opacity: 0;
}

.cv-card:nth-child(1) { animation-delay: 0.05s; }
.cv-card:nth-child(2) { animation-delay: 0.1s; }
.cv-card:nth-child(3) { animation-delay: 0.15s; }
.cv-card:nth-child(4) { animation-delay: 0.2s; }
.cv-card:nth-child(5) { animation-delay: 0.25s; }
.cv-card:nth-child(6) { animation-delay: 0.3s; }
.cv-card:nth-child(7) { animation-delay: 0.35s; }
.cv-card:nth-child(8) { animation-delay: 0.4s; }
.cv-card:nth-child(9) { animation-delay: 0.45s; }

.cv-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg), 0 0 40px rgba(59, 130, 246, 0.08);
  border-color: var(--border-hover);
}

.cv-card-thumbnail {
  height: 200px;
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.cv-card-thumbnail svg {
  width: 56px;
  height: 56px;
  color: var(--text-muted);
  opacity: 0.5;
}

.cv-card-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cv-card-body {
  padding: 20px;
}

.cv-card-filename {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.cv-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.cv-card-stats {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.cv-card-stat {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.cv-card-stat svg {
  width: 16px;
  height: 16px;
}

.cv-card-badge {
  display: inline-flex;
  align-items: center;
}

/* ============================================================
   STARS
   ============================================================ */
.stat-stars {
  color: var(--star);
  font-size: 0.85rem;
  letter-spacing: 1px;
}

.rating-stars {
  display: flex;
  gap: 4px;
  direction: rtl;
}

.rating-stars .star {
  font-size: 28px;
  cursor: pointer;
  color: var(--text-muted);
  transition: color var(--transition-fast), transform var(--transition-fast);
  -webkit-user-select: none;
  user-select: none;
  background: none;
  border: none;
  padding: 0;
  line-height: 1;
}

.rating-stars .star:hover,
.rating-stars .star:hover ~ .star,
.rating-stars .star.active {
  color: var(--star);
  transform: scale(1.15);
}

/* ============================================================
   UPLOAD ZONE
   ============================================================ */
.upload-zone {
  border: 2px dashed var(--border-hover);
  border-radius: var(--radius-xl);
  padding: 60px 24px;
  text-align: center;
  background: var(--bg-secondary);
  cursor: pointer;
  transition: all 300ms ease;
  position: relative;
  overflow: hidden;
}

.upload-zone::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, var(--accent-subtle) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 300ms ease;
}

.upload-zone:hover {
  border-color: var(--accent);
  background: rgba(12, 19, 34, 0.8);
}

.upload-zone:hover::before {
  opacity: 1;
}

.upload-zone.dragover {
  border-color: var(--accent);
  background: var(--accent-subtle);
  box-shadow: var(--shadow-glow), inset 0 0 40px rgba(59, 130, 246, 0.05);
}

.upload-zone.dragover .upload-icon {
  transform: scale(1.1) translateY(-4px);
  color: var(--accent);
}

.upload-icon {
  display: block;
  margin: 0 auto 20px;
  width: 64px;
  height: 64px;
  color: var(--text-muted);
  transition: transform var(--transition-base), color var(--transition-base);
}

.upload-zone-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  position: relative;
}

.upload-zone-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  position: relative;
}

.upload-zone input[type="file"] {
  display: none;
}

/* ============================================================
   UPLOAD PROGRESS
   ============================================================ */
.upload-progress {
  margin-top: 24px;
}

.upload-progress-bar {
  height: 4px;
  background: var(--bg-elevated);
  border-radius: 2px;
  overflow: hidden;
}

.upload-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
  border-radius: 2px;
  width: 0%;
  transition: width 300ms ease;
}

.upload-progress-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 8px;
  text-align: right;
  font-family: 'JetBrains Mono', monospace;
}

/* ============================================================
   FILE PREVIEW
   ============================================================ */
.file-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 24px;
  padding: 16px 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  animation: fadeIn 0.3s ease forwards;
}

.file-preview-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.file-preview-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  flex-shrink: 0;
}

.file-preview-details {
  min-width: 0;
}

.file-preview-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-preview-size {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}

.file-preview-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast), background var(--transition-fast);
}

.file-preview-remove:hover {
  color: var(--error);
  background: rgba(239, 68, 68, 0.1);
}

/* ============================================================
   CV VIEWER
   ============================================================ */
.cv-viewer {
  width: 100%;
  height: 70vh;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: #ffffff;
  overflow: hidden;
}

.cv-viewer iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* ============================================================
   RATING FORM
   ============================================================ */
.rating-form {
  background: var(--bg-secondary);
  padding: 32px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  margin-top: 32px;
}

.rating-form h3 {
  margin-bottom: 20px;
}

.rating-form textarea {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 16px;
  border-radius: var(--radius-md);
  resize: vertical;
  min-height: 120px;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  line-height: 1.6;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
  margin-top: 16px;
}

.rating-form textarea::placeholder {
  color: var(--text-muted);
}

.rating-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-subtle), var(--shadow-glow);
}

.char-count {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: right;
  margin-top: 8px;
  font-family: 'JetBrains Mono', monospace;
}

.rating-form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}

/* ============================================================
   RATINGS LIST
   ============================================================ */
.ratings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 48px;
  margin-bottom: 24px;
}

.ratings-header h3 {
  font-size: 1.25rem;
}

.ratings-count {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}

.ratings-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.rating-item {
  background: var(--bg-secondary);
  padding: 24px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  animation: fadeIn 0.4s ease forwards;
  opacity: 0;
}

.rating-item:nth-child(1) { animation-delay: 0.05s; }
.rating-item:nth-child(2) { animation-delay: 0.1s; }
.rating-item:nth-child(3) { animation-delay: 0.15s; }
.rating-item:nth-child(4) { animation-delay: 0.2s; }
.rating-item:nth-child(5) { animation-delay: 0.25s; }

.rating-item-stars {
  margin-bottom: 12px;
}

.rating-item-comment {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

.rating-item-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 12px;
  font-family: 'JetBrains Mono', monospace;
}

/* ============================================================
   MY CVs
   ============================================================ */
.my-cv-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.my-cv-item {
  display: flex;
  gap: 24px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
  animation: fadeIn 0.5s ease forwards;
  opacity: 0;
}

.my-cv-item:nth-child(1) { animation-delay: 0.05s; }
.my-cv-item:nth-child(2) { animation-delay: 0.1s; }
.my-cv-item:nth-child(3) { animation-delay: 0.15s; }
.my-cv-item:nth-child(4) { animation-delay: 0.2s; }

.my-cv-item:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
}

.my-cv-thumbnail {
  width: 200px;
  min-height: 140px;
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.my-cv-thumbnail svg {
  width: 40px;
  height: 40px;
  color: var(--text-muted);
  opacity: 0.5;
}

.my-cv-info {
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
  min-width: 0;
}

.my-cv-filename {
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 6px;
}

.my-cv-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.my-cv-stats {
  display: flex;
  align-items: center;
  gap: 20px;
}

.my-cv-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

/* Login prompt */
.login-prompt {
  text-align: center;
  padding: 80px 24px;
  max-width: 480px;
  margin: 0 auto;
}

.login-prompt-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
  color: var(--text-muted);
  opacity: 0.6;
}

.login-prompt h2 {
  margin-bottom: 12px;
}

.login-prompt p {
  margin-bottom: 32px;
}

/* ============================================================
   CV DETAIL PAGE
   ============================================================ */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 96px;
  margin-bottom: 24px;
  padding: 8px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: none;
  border: none;
  cursor: pointer;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: color var(--transition-fast), background var(--transition-fast);
}

.back-btn:hover {
  color: var(--text-primary);
  background: var(--bg-elevated);
}

.back-btn svg {
  width: 18px;
  height: 18px;
}

.cv-detail-header {
  margin-bottom: 32px;
}

.cv-detail-title {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.cv-detail-title h1 {
  font-size: 1.75rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cv-detail-date {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.cv-detail-stats {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 16px;
  padding: 16px 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.cv-detail-stat {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.cv-detail-stat strong {
  color: var(--text-primary);
  font-weight: 700;
}

.cv-detail-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  margin-bottom: 24px;
}

/* ============================================================
   TOAST
   ============================================================ */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 300px;
  max-width: 440px;
  padding: 16px 24px;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  border-left: 4px solid var(--border);
  box-shadow: var(--shadow-lg);
  animation: slideInRight 0.4s var(--transition-slow) forwards;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.toast-success {
  border-left-color: var(--success);
}

.toast-error {
  border-left-color: var(--error);
}

.toast-warning {
  border-left-color: var(--warning);
}

.toast-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

.toast-message {
  font-size: 0.9rem;
  color: var(--text-primary);
  line-height: 1.4;
}

.toast-dismiss {
  animation: slideOutRight 0.3s ease forwards;
}

/* ============================================================
   AVATAR
   ============================================================ */
.avatar {
  border-radius: 50%;
  border: 2px solid var(--border);
  object-fit: cover;
  transition: border-color var(--transition-fast);
}

.avatar:hover {
  border-color: var(--border-hover);
}

.avatar-sm { width: 32px; height: 32px; }
.avatar-md { width: 40px; height: 40px; }
.avatar-lg { width: 64px; height: 64px; }

/* ============================================================
   BADGE
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1;
}

.badge-pdf {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.badge-docx {
  background: rgba(59, 130, 246, 0.15);
  color: #3B82F6;
}

/* ============================================================
   SKELETON / LOADING
   ============================================================ */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-secondary) 25%,
    var(--bg-elevated) 50%,
    var(--bg-secondary) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-md);
}

.skeleton-card {
  height: 320px;
  border-radius: var(--radius-lg);
}

.skeleton-text {
  height: 14px;
  border-radius: 4px;
  margin-bottom: 8px;
}

.skeleton-text-lg {
  height: 20px;
  width: 60%;
}

.loading-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin: 0 auto;
}

.loading-spinner-lg {
  width: 40px;
  height: 40px;
  border-width: 4px;
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 80px 24px;
}

.empty-state-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
  color: var(--text-muted);
  opacity: 0.5;
}

.empty-state h2 {
  margin-bottom: 12px;
  font-size: 1.5rem;
}

.empty-state p {
  max-width: 400px;
  margin: 0 auto 32px;
}

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: fadeIn 0.2s ease forwards;
}

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 480px;
  width: 90%;
  box-shadow: var(--shadow-lg);
  animation: scaleIn 0.3s var(--transition-slow) forwards;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.modal-header h2 {
  font-size: 1.25rem;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast), background var(--transition-fast);
}

.modal-close:hover {
  color: var(--text-primary);
  background: var(--bg-elevated);
}

.modal-body {
  margin-bottom: 24px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* ============================================================
   DROPDOWN
   ============================================================ */
.dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 100;
  min-width: 180px;
  animation: scaleIn 0.2s ease forwards;
  overflow: hidden;
}

.dropdown-item {
  display: block;
  width: 100%;
  padding: 10px 16px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
  text-decoration: none;
  font-family: 'Inter', sans-serif;
}

.dropdown-item:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

/* ============================================================
   GUIDELINES
   ============================================================ */
.guidelines {
  margin-top: 40px;
  padding: 28px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.guidelines h3 {
  margin-bottom: 16px;
  font-size: 1rem;
  color: var(--text-primary);
}

.guidelines-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.guidelines-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.guidelines-list li svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--accent);
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

.fade-in {
  animation: fadeIn 0.5s ease forwards;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Tablet */
@media (max-width: 1024px) {
  .feed-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
  }

  .hero-title {
    font-size: 2.75rem;
  }
}

/* Mobile */
@media (max-width: 640px) {
  .container {
    padding: 0 16px;
  }

  /* Mobile nav */
  .nav-links {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    bottom: 0;
    flex-direction: column;
    align-items: stretch;
    background: rgba(6, 10, 20, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 24px;
    gap: 4px;
    transform: translateX(-100%);
    opacity: 0;
    transition: transform var(--transition-slow), opacity var(--transition-base);
    z-index: 999;
  }

  .nav-links.open {
    transform: translateX(0);
    opacity: 1;
  }

  .nav-link {
    padding: 14px 16px;
    font-size: 1rem;
  }

  .nav-auth {
    display: none;
  }

  .nav-links.open ~ .nav-auth,
  .nav-links .nav-auth-mobile {
    display: flex;
  }

  .nav-mobile-toggle {
    display: flex;
  }

  /* Hero */
  .hero {
    padding-top: 110px;
    padding-bottom: 48px;
  }

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

  .hero-subtitle {
    font-size: 1rem;
  }

  .hero-stats {
    flex-direction: column;
    gap: 12px;
  }

  .hero-stat {
    padding: 16px 24px;
    flex-direction: row;
    gap: 12px;
  }

  .hero-stat-number {
    font-size: 1.75rem;
  }

  /* Feed */
  .feed-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .feed-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  /* Page header */
  .page-header {
    padding-top: 100px;
    margin-bottom: 32px;
  }

  .page-header h1 {
    font-size: 1.75rem;
  }

  /* My CVs */
  .my-cv-item {
    flex-direction: column;
  }

  .my-cv-thumbnail {
    width: 100%;
    min-height: 120px;
  }

  /* Upload */
  .upload-zone {
    padding: 40px 20px;
  }

  /* CV Detail */
  .cv-viewer {
    height: 50vh;
  }

  .cv-detail-stats {
    flex-direction: column;
    gap: 12px;
  }

  .rating-form {
    padding: 20px;
  }

  /* Toast */
  .toast-container {
    left: 16px;
    right: 16px;
    bottom: 16px;
  }

  .toast {
    min-width: auto;
    max-width: none;
  }
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mt-5 { margin-top: 40px; }
.mt-6 { margin-top: 48px; }

.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.mb-5 { margin-bottom: 40px; }
.mb-6 { margin-bottom: 48px; }

.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-gap-sm { gap: 8px; }
.flex-gap-md { gap: 16px; }
.flex-gap-lg { gap: 24px; }

.hidden { display: none !important; }

.visible-mobile { display: none; }
@media (max-width: 640px) {
  .visible-mobile { display: block; }
  .hidden-mobile { display: none !important; }
}

.truncate {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
.hidden { display: none !important; }
.toast { opacity: 0; transform: translateX(100%); }
.toast.show { opacity: 1; transform: translateX(0); transition: all 0.4s ease; }
.toast.hiding { opacity: 0; transform: translateX(100%); transition: all 0.3s ease; }
.user-menu { position: relative; }
.user-menu-trigger { display: flex; align-items: center; gap: 8px; padding: 4px 8px; background: none; border: none; color: var(--text-primary); cursor: pointer; border-radius: var(--radius-sm); transition: background var(--transition-fast); font-family: 'Inter', sans-serif; font-size: 0.875rem; }
.user-menu-trigger:hover { background: var(--bg-elevated); }
.user-menu-name { font-weight: 500; }
.dropdown { display: none; }
.dropdown.show { display: block; }
.dropdown-item-danger { color: var(--error); }
.dropdown-item-danger:hover { background: rgba(239,68,68,0.1); color: var(--error); }
.star-icon { font-size: 0.85rem; }
.star-filled { color: var(--star); }
.star-half { color: var(--star); opacity: 0.6; }
.star-empty { color: var(--text-muted); opacity: 0.4; }
.stars-row { display: flex; gap: 4px; }
.star-btn { font-size: 28px; background: none; border: none; color: var(--text-muted); cursor: pointer; transition: color 150ms, transform 150ms; padding: 0; line-height: 1; }
.star-btn:hover, .star-btn.hover { color: var(--star); transform: scale(1.15); }
.star-btn.active { color: var(--star); }
.stars-label { font-size: 0.8rem; color: var(--text-muted); margin-left: 8px; }
.rating-stars-input label, .rating-comment-input label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 8px; color: var(--text-primary); }
.rating-comment-input { margin-top: 20px; }
.char-count.met { color: var(--success); }
.rating-form-notice { padding: 24px; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius-md); margin-top: 32px; text-align: center; }
.rating-form-notice p { color: var(--text-secondary); display: flex; align-items: center; justify-content: center; gap: 12px; }
.ratings-title { font-size: 1.25rem; margin-bottom: 16px; margin-top: 32px; }
.ratings-empty { text-align: center; padding: 40px 24px; color: var(--text-muted); }
.rating-item-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cv-no-preview { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 70vh; color: var(--text-muted); gap: 16px; text-align: center; }
.cv-no-preview h3 { color: var(--text-primary); }
.loading-center { display: flex; justify-content: center; padding: 40px 0; }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-center { text-align: center; }
.stat-value { font-weight: 700; color: var(--text-primary); font-family: 'JetBrains Mono', monospace; }
.my-cv-main { display: flex; align-items: center; gap: 20px; padding: 20px; flex-wrap: wrap; }
.my-cv-icon { flex-shrink: 0; }
.my-cv-meta { display: flex; align-items: center; gap: 8px; font-size: 0.8rem; color: var(--text-muted); }
.my-cv-stat { display: flex; flex-direction: column; align-items: center; padding: 8px 16px; }
.my-cv-stat-value { font-size: 1.25rem; font-weight: 700; color: var(--text-primary); font-family: 'JetBrains Mono', monospace; }
.my-cv-stat-label { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-top: 2px; }
.my-cv-ratings { padding: 0 20px 20px; border-top: 1px solid var(--border); }
.cv-card-pdf-preview { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.cv-card-file-icon { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
