:root {
  --bg-body: #f5f7fb;
  --bg-card: #ffffff;
  --border-card: #e0e4ee;
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --accent-soft: #dbeafe;
  --text-main: #111827;
  --text-muted: #6b7280;
  --error: #b91c1c;
  --success: #15803d;
  --shadow-soft: 0 10px 25px rgba(15, 23, 42, 0.08);
  --radius-md: 10px;
  --radius-lg: 14px;
  --transition-fast: 0.15s ease-in-out;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top left, #e0f2fe, #eff6ff 45%, #f9fafb 80%);
  color: var(--text-main);
  line-height: 1.5;
}

/* Layout */

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.site-header {
  background: linear-gradient(120deg, #1d4ed8, #4f46e5);
  color: #ffffff;
  padding: 1.5rem 0 1.75rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.4);
}

.site-header h1 {
  margin: 0 0 0.35rem;
  font-size: 1.8rem;
  letter-spacing: 0.03em;
}

.site-header .tagline {
  margin: 0;
  font-size: 0.95rem;
  opacity: 0.92;
}

.site-footer {
  margin-top: 2rem;
  padding: 1.5rem 0 2rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
}

/* Sections & cards */

.intro {
  margin-bottom: 1.5rem;
}

.intro h2 {
  margin-top: 0;
}

.intro p {
  color: var(--text-muted);
  max-width: 60rem;
}

.card {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-card);
  box-shadow: var(--shadow-soft);
  padding: 1.75rem 1.5rem 1.75rem;
  margin-bottom: 1.5rem;
}

.card h2 {
  margin-top: 0;
  margin-bottom: 0.75rem;
}

.info {
  margin-top: 1.5rem;
  color: var(--text-muted);
}

.info h3 {
  margin-top: 0;
}

/* Form elements */

form {
  display: block;
}

.form-group {
  margin-bottom: 1rem;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

input[type="file"],
textarea {
  width: 100%;
  font: inherit;
  border-radius: 8px;
  border: 1px solid #cbd5f5;
  padding: 0.6rem 0.7rem;
  resize: vertical;
  min-height: 2.75rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast);
  background-color: #f9fafb;
}

textarea {
  background-color: #fdfdff;
}

input[type="file"]:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.4);
  background-color: #ffffff;
}

.help-text {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Buttons */

button,
.btn-primary,
.btn-secondary,
.btn-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  font: inherit;
  cursor: pointer;
  border-radius: 999px;
  border: none;
  padding: 0.6rem 1.4rem;
  text-decoration: none;
  transition: background-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast), color var(--transition-fast);
}

.btn-primary {
  background: linear-gradient(120deg, var(--accent), var(--accent-dark));
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.45);
}

.btn-primary:hover {
  background: linear-gradient(120deg, var(--accent-dark), #1e40af);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.55);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.45);
}

.btn-secondary {
  background-color: #eef2ff;
  color: #1e3a8a;
  border-radius: 999px;
  border: 1px solid #c7d2fe;
  font-size: 0.9rem;
}

.btn-secondary:hover {
  background-color: #e0e7ff;
}

.btn-link {
  background: transparent;
  color: var(--accent);
  padding-left: 0;
  padding-right: 0;
  border-radius: 0;
}

.btn-link:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

button:disabled,
.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

/* Status messages */

.status-message {
  margin: 0.5rem 0 0.9rem;
  font-size: 0.9rem;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.status-info {
  background-color: #eff6ff;
  color: #1e3a8a;
  border: 1px solid #bfdbfe;
}

.status-error {
  background-color: #fef2f2;
  color: var(--error);
  border: 1px solid #fecaca;
}

.status-success {
  background-color: #ecfdf3;
  color: var(--success);
  border: 1px solid #bbf7d0;
}

/* Credits badge */

.credits-badge {
  display: inline-block;
  background-color: var(--accent-soft);
  color: #1e3a8a;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  border: 1px solid #bfdbfe;
  margin-bottom: 0.8rem;
}

/* Resume output */

.resume-output {
  white-space: pre-wrap;
  background-color: #0f172a;
  color: #e5e7eb;
  border-radius: 8px;
  padding: 1rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.9rem;
  border: 1px solid #1f2937;
  margin-bottom: 0.75rem;
  max-height: 520px;
  overflow: auto;
}

/* Button row */

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

/* No credits box */

.no-credits {
  margin-top: 1rem;
  padding: 0.75rem 0.8rem;
  border-radius: 8px;
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  color: var(--error);
}

/* Utilities */

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.85em;
}

/* Responsive */

@media (max-width: 640px) {
  .site-header {
    text-align: center;
  }

  .card {
    padding: 1.3rem 1rem 1.4rem;
  }

  .button-row {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-secondary {
    width: 100%;
    justify-content: center;
  }
}