/* ===== RESET & BASE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #f8f9fc;
  color: #333;
  padding-top: 70px;
  /* fixed header height */
	background-image: url("assets/images/bg.png");
	backgournd-size: 20%;
	background-repeat: repeat;
}

/* ===== FIXED HEADER ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: white;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  padding: 0 20px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 24px;
  font-weight: 700;
  color: #667eea;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: #667eea;
  stroke-width: 2;
}

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

.nav-links a {
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  color: #555;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: #667eea;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-block;
  padding: 10px 24px;
  border: none;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
  background: #f0f2f5;
  color: #333;
}

.btn-secondary:hover {
  background: #e4e7ed;
}

.btn-outline {
  background: transparent;
  color: #667eea;
  border: 2px solid #667eea;
}

.btn-outline:hover {
  background: #667eea;
  color: white;
}

.btn-danger {
  background: #e74c3c;
  color: white;
}

.btn-danger:hover {
  background: #c0392b;
}

.btn-large {
  padding: 14px 36px;
  font-size: 16px;
}

/* ===== LANDING PAGE ===== */
.landing {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

.hero {
  text-align: center;
  padding: 80px 0 60px;
}

.hero h1 {
  font-size: 48px;
  font-weight: 700;
  color: #2d3748;
  margin-bottom: 16px;
}

.hero p {
  font-size: 20px;
  color: #718096;
  max-width: 600px;
  margin: 0 auto 32px;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
  margin: 60px 0;
}

.feature {
  background: white;
  padding: 30px 20px;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  text-align: center;
}

.feature h3 {
  font-size: 18px;
  color: #2d3748;
  margin-bottom: 8px;
}

.feature p {
  color: #718096;
  font-size: 14px;
  line-height: 1.6;
}

footer {
  text-align: center;
  color: #a0aec0;
  font-size: 14px;
  padding: 40px 0 20px;
}

/* ===== FORM & CARDS ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.card {
  background: white;
  border-radius: 16px;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
  padding: 30px;
  margin-bottom: 30px;
}

.card h2 {
  font-size: 22px;
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid #edf2f7;
}

/* ===== FORM ELEMENTS ===== */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  color: #4a5568;
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: #fcfdff;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
  background: white;
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.form-group .hint {
  display: block;
  margin-top: 5px;
  font-size: 13px;
  color: #a0aec0;
}

/* ===== CV FORM LAYOUT ===== */
.cv-form {
  background: white;
  border-radius: 20px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.06);
  padding: 40px;
  max-width: 1000px;
  margin: 0 auto;
}

.form-section {
  margin-bottom: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid #edf2f7;
}

.form-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.form-section h2 {
  font-size: 20px;
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.form-section h2::after {
  content: '';
  flex: 1;
  height: 2px;
  background: linear-gradient(to right, #667eea, transparent);
}

.btn-add {
  background: #667eea;
  color: white;
  border: none;
  border-radius: 30px;
  padding: 8px 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  margin-bottom: 15px;
}

.btn-add:hover {
  background: #764ba2;
}

.btn-add-small {
  background: #edf2f7;
  color: #4a5568;
  border: none;
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-add-small:hover {
  background: #e2e8f0;
}

/* ===== ITEM CARDS (Experience, Education, Referees) ===== */
.item-card {
  background: #f7fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 12px;
  position: relative;
}

.item-card .card-buttons {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 8px;
}

.item-card .edit-btn,
.item-card .remove-btn {
  background: white;
  border: none;
  border-radius: 6px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.item-card .edit-btn {
  color: #667eea;
}

.item-card .edit-btn:hover {
  background: #667eea;
  color: white;
}

.item-card .remove-btn {
  color: #e74c3c;
}

.item-card .remove-btn:hover {
  background: #e74c3c;
  color: white;
}

.item-card h4 {
  font-size: 16px;
  color: #2d3748;
  margin-bottom: 4px;
}

.item-card p {
  font-size: 14px;
  color: #4a5568;
  margin: 2px 0;
}

/* ===== SKILLS ===== */
.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skill-tag {
  background: #ebf4ff;
  color: #2b6cb0;
  padding: 6px 16px;
  border-radius: 30px;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.skill-tag button {
  background: none;
  border: none;
  color: #e74c3c;
  cursor: pointer;
  font-size: 16px;
  padding: 0;
}

/* ===== TEMPLATE SELECTOR ===== */
.template-selector {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.template-option {
  display: flex;
  flex-direction: column;
  padding: 16px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.template-option:hover {
  border-color: #667eea;
  background: #f7faff;
}

.template-option input[type="radio"] {
  margin-bottom: 10px;
}

.template-option .template-name {
  font-weight: 600;
  color: #2d3748;
}

.template-option .template-desc {
  font-size: 13px;
  color: #a0aec0;
}

.template-option input[type="radio"]:checked+.template-name {
  color: #667eea;
}

/* ===== CUSTOM SECTIONS ===== */
.custom-section {
  background: #f7fafc;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  border: 1px solid #e2e8f0;
}

.custom-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.custom-section-header h4 {
  font-size: 16px;
  color: #2d3748;
  margin: 0;
}

.custom-section-header button {
  background: none;
  border: none;
  color: #e74c3c;
  font-size: 22px;
  cursor: pointer;
}

.custom-field-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: white;
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 6px;
  border: 1px solid #edf2f7;
}

.custom-field-item .field-label {
  font-weight: 600;
  color: #4a5568;
}

.custom-field-item .field-value {
  color: #2d3748;
}

.custom-field-item button {
  background: none;
  border: none;
  color: #e74c3c;
  cursor: pointer;
  font-size: 16px;
}

/* ===== PROFILE PICTURE PREVIEW ===== */
.pic-preview {
  margin-top: 12px;
}

.pic-preview img {
  max-width: 120px;
  max-height: 120px;
  border-radius: 50%;
  border: 3px solid #667eea;
  object-fit: cover;
}

/* ===== MODAL ===== */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: white;
  padding: 30px;
  border-radius: 16px;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.modal-content .close {
  float: right;
  font-size: 28px;
  font-weight: bold;
  color: #a0aec0;
  cursor: pointer;
}

.modal-content .close:hover {
  color: #2d3748;
}

.modal-content .close {
    float: right;
    font-size: 0;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}
.modal-content .close svg {
    width: 24px;
    height: 24px;
    stroke: #a0aec0;
    transition: stroke 0.2s;
}
.modal-content .close:hover svg {
    stroke: #2d3748;
}

/* ===== DASHBOARD GRID ===== */
.cv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 25px;
}

.cv-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}

.cv-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.cv-card-header {
  background: linear-gradient(135deg, #667eea, #764ba2);
  padding: 20px;
  color: white;
}

.cv-card-header .name {
  font-size: 18px;
  font-weight: 700;
}

.cv-card-header .email {
  font-size: 13px;
  opacity: 0.9;
}

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

.cv-card-body .info-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 4px 0;
}

.cv-card-body .info-row .label {
  color: #a0aec0;
}

.cv-card-body .info-row .value {
  font-weight: 600;
}

.cv-card-actions {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.cv-card-actions .btn {
  flex: 1;
  text-align: center;
  padding: 8px 0;
  font-size: 13px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .navbar {
    flex-wrap: wrap;
    height: auto;
    padding: 10px 16px;
  }

  body {
    padding-top: 90px;
  }

  .hero h1 {
    font-size: 32px;
  }

  .hero p {
    font-size: 16px;
  }

  .cv-form {
    padding: 20px;
  }

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

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

  .form-actions {
    flex-direction: column;
    gap: 12px;
  }

  .form-actions .btn {
    width: 100%;
  }
}

/* Modal close icon SVG */
.modal-content .close {
    float: right;
    font-size: 0;  /* hide text, only show SVG */
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}
.modal-content .close svg {
    width: 24px;
    height: 24px;
    stroke: #a0aec0;
    transition: stroke 0.2s;
}
.modal-content .close:hover svg {
    stroke: #2d3748;
}

/* Consistent add button icons */
.btn-add {
    background: #667eea;
    color: white;
    border: none;
    border-radius: 30px;
    padding: 8px 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    margin-bottom: 15px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn-add:hover {
    background: #764ba2;
}
.btn-add svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
}

/* Hint text styling */
.hint {
    display: block;
    margin-top: 5px;
    font-size: 13px;
    color: #a0aec0;
}