.cv-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(42, 37, 32, 0.45);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.cv-modal-overlay.cv-modal-open {
  display: flex;
}

.cv-modal-box {
  background: var(--bg-primary);
  color: var(--text-primary);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  max-width: 420px;
  width: 100%;
  padding: 32px;
  position: relative;
}

.cv-modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--text-secondary);
  cursor: pointer;
}

.cv-modal-box h2 {
  margin-top: 0;
  color: var(--text-primary);
}

.cv-modal-box p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.cv-modal-box input[type="email"] {
  width: 100%;
  padding: 12px 14px;
  border-radius: 6px;
  border: 1.5px solid var(--border-color);
  font-size: 1rem;
  margin-bottom: 16px;
  box-sizing: border-box;
}

.cv-modal-box input[type="email"]:focus {
  outline: none;
  border-color: var(--accent-primary);
}

.cv-modal-hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.cv-modal-submit {
  width: 100%;
  padding: 12px 20px;
  border-radius: 6px;
  background: var(--accent-primary);
  color: #fff;
  border: none;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s ease;
}

.cv-modal-submit:hover {
  background: var(--accent-light);
}

.cv-modal-submit:disabled {
  opacity: 0.6;
  cursor: default;
}

.cv-modal-privacy-line {
  font-size: 0.8rem;
  margin-top: 12px;
  margin-bottom: 0;
}

.cv-modal-privacy-line a {
  color: var(--accent-primary);
}

.cv-modal-message {
  font-size: 0.9rem;
  margin-top: 12px;
  min-height: 1.2em;
}

.cv-modal-message.cv-modal-message-error {
  color: #a33;
}

.cv-modal-message.cv-modal-message-success {
  color: #3a7d3a;
}

/* Mobile touch-button styling for the "Download CV" trigger, replacing the
   old a[href*="matteolionello_cv.pdf"] selector now that the button no
   longer links directly to the PDF. */
@media (max-width: 768px) {
  .cv-download-btn {
    background: var(--accent-primary);
    color: white;
    box-shadow: 0 4px 16px rgba(139, 125, 91, 0.25);
    border: none;
    margin: 8px 8px;
  }

  .cv-download-btn:active {
    transform: scale(0.98);
    box-shadow: 0 2px 8px rgba(139, 125, 91, 0.15);
  }
}
