/* DutchEngineer Resume Transformer */

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

:root {
  --teal: #6998a5;
  --teal-dark: #487886;
  --ink: #0a0a0b;
  --ink-light: #111214;
  --ink-border: rgba(255, 255, 255, 0.08);
  --ivory: #f5f2eb;
  --ivory-muted: rgba(245, 242, 235, 0.5);
  --surface: #1a1c1f;
  --coral: #e05555;
  --font-body: "Sora", sans-serif;
  --font-mono: "JetBrains Mono", monospace;
  --radius: 0.5rem;
}

html {
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background: var(--ink);
  color: var(--ivory);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--ink-border);
}

.logo {
  text-decoration: none;
  display: flex;
  align-items: center;
}

.logo-img {
  height: 1.5rem;
  width: auto;
  display: block;
}

.header-cta {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ivory-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.header-cta:hover {
  color: var(--ivory);
}

/* Hero */
.hero {
  padding: 5rem 2rem 3rem;
  text-align: center;
}

.hero-inner {
  max-width: 46rem;
  margin: 0 auto;
}

.hero-eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}

.hero-sub {
  font-size: 1rem;
  color: var(--ivory-muted);
  line-height: 1.6;
  max-width: 36rem;
  margin: 0 auto;
}

/* Upload */
.upload-section {
  padding: 2rem;
  flex: 1;
}

.upload-inner {
  max-width: 36rem;
  margin: 0 auto;
}

.upload-box {
  border: 2px dashed var(--ink-border);
  border-radius: var(--radius);
  padding: 3rem 2rem;
  text-align: center;
  cursor: pointer;
  transition:
    border-color 0.2s,
    background 0.2s;
}

.upload-box:hover,
.upload-box.drag-over {
  border-color: var(--teal);
  background: rgba(105, 152, 165, 0.05);
}

.upload-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  color: var(--teal);
}

.upload-label {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.upload-sub {
  font-size: 0.875rem;
  color: var(--ivory-muted);
  margin-bottom: 1rem;
}

.upload-browse {
  background: none;
  border: none;
  color: var(--teal);
  font-family: var(--font-body);
  font-size: 0.875rem;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}

.upload-hint {
  font-size: 0.75rem;
  color: var(--ivory-muted);
}

/* File selected */
.file-selected {
  margin-top: 1rem;
}

.file-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--ink-border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.file-icon {
  font-size: 1.25rem;
}

.file-name {
  flex: 1;
  font-size: 0.875rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-remove {
  background: none;
  border: none;
  color: var(--ivory-muted);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0 0.25rem;
  line-height: 1;
}

.file-remove:hover {
  color: var(--coral);
}

.transform-btn {
  width: 100%;
  background: var(--teal-dark);
  color: var(--ivory);
  border: none;
  border-radius: var(--radius);
  padding: 0.875rem 1.5rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.transform-btn:hover {
  background: var(--teal);
}

/* Processing */
.processing {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6rem 2rem;
  gap: 1.5rem;
}

.processing-inner {
  text-align: center;
}

.spinner {
  width: 2.5rem;
  height: 2.5rem;
  border: 3px solid var(--ink-border);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1.5rem;
}

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

.processing-label {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.processing-sub {
  font-size: 0.875rem;
  color: var(--ivory-muted);
}

/* Results */
.results {
  padding: 2rem;
  flex: 1;
}

.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 72rem;
  margin: 0 auto 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.results-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
}

.results-actions {
  display: flex;
  gap: 0.75rem;
}

.diff-view {
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  gap: 0;
  max-width: 72rem;
  margin: 0 auto;
  min-height: 60vh;
  border: 1px solid var(--ink-border);
  border-radius: var(--radius);
  overflow: hidden;
}

.diff-pane {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  min-height: 0;
}

.diff-pane-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.5rem 1rem;
  border-bottom: 1px solid var(--ink-border);
}

.diff-pane-label.before {
  color: var(--ivory-muted);
}
.diff-pane-label.after {
  color: var(--teal);
}

.diff-divider {
  background: var(--ink-border);
}

.resume-preview {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--ivory);
  white-space: pre-wrap;
  font-family: var(--font-mono);
}

/* Rendered resume in after pane */
.resume-rendered {
  font-family: var(--font-body);
  white-space: normal;
}
.resume-rendered .r-name {
  font-size: 1.375rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 0.125rem;
}
.resume-rendered .r-title {
  font-size: 0.9375rem;
  text-align: center;
  color: var(--ivory-muted);
  margin-bottom: 1.25rem;
}
.resume-rendered .r-summary {
  font-size: 0.8125rem;
  line-height: 1.6;
  margin-bottom: 1.25rem;
}
.resume-rendered .r-section-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: center;
  border-top: 1px solid var(--ink-border);
  border-bottom: 1px solid var(--ink-border);
  padding: 0.25rem 0;
  margin: 1rem 0 0.75rem;
}
.resume-rendered .r-job {
  margin-bottom: 1rem;
}
.resume-rendered .r-job-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-bottom: 0.25rem;
}
.resume-rendered .r-job-title {
  font-size: 0.875rem;
  font-weight: 700;
}
.resume-rendered .r-job-meta {
  font-size: 0.75rem;
  color: var(--ivory-muted);
}
.resume-rendered .r-bullets {
  padding-left: 1rem;
  list-style: disc;
}
.resume-rendered .r-bullets li {
  font-size: 0.8125rem;
  line-height: 1.55;
  margin-bottom: 0.25rem;
}
.resume-rendered .r-skills {
  font-size: 0.8125rem;
  line-height: 1.7;
}
.resume-rendered .r-skills strong {
  color: var(--ivory);
}
.resume-rendered .r-edu-item {
  font-size: 0.8125rem;
  margin-bottom: 0.25rem;
}
.resume-rendered .r-edu-item strong {
  font-weight: 600;
}

/* Buttons */
.btn-primary {
  background: var(--teal-dark);
  color: var(--ivory);
  border: none;
  border-radius: var(--radius);
  padding: 0.625rem 1.25rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: background 0.2s;
}

.btn-primary:hover {
  background: var(--teal);
}

.btn-primary.btn-lg {
  padding: 0.875rem 2rem;
  font-size: 1rem;
}

.btn-secondary {
  background: none;
  color: var(--ivory-muted);
  border: 1px solid var(--ink-border);
  border-radius: var(--radius);
  padding: 0.625rem 1.25rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition:
    color 0.2s,
    border-color 0.2s;
}

.btn-secondary:hover {
  color: var(--ivory);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Error */
.error-section {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 2rem;
}

.error-inner {
  text-align: center;
  max-width: 28rem;
}

.error-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--coral);
}
.error-msg {
  font-size: 0.9375rem;
  margin-bottom: 1.5rem;
  color: var(--ivory-muted);
}

/* Bottom CTA */
.bottom-cta {
  padding: 5rem 2rem;
  text-align: center;
  border-top: 1px solid var(--ink-border);
}

.bottom-cta-inner {
  max-width: 36rem;
  margin: 0 auto;
}

.bottom-cta h2 {
  font-size: clamp(1.375rem, 3vw, 1.875rem);
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.bottom-cta p {
  font-size: 0.9375rem;
  color: var(--ivory-muted);
  line-height: 1.6;
  margin-bottom: 2rem;
}

/* Footer */
.site-footer {
  padding: 1.5rem 2rem;
  text-align: center;
  border-top: 1px solid var(--ink-border);
  font-size: 0.8125rem;
  color: var(--ivory-muted);
}

.site-footer a {
  color: var(--ivory-muted);
  text-decoration: none;
}
.site-footer a:hover {
  color: var(--ivory);
}

/* Utilities */
.hidden {
  display: none !important;
}

/* Responsive */
@media (max-width: 640px) {
  .hero {
    padding: 3rem 1.25rem 2rem;
  }
  .upload-section,
  .results {
    padding: 1.25rem;
  }
  .diff-view {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 1px 1fr;
  }
  .results-header {
    flex-direction: column;
    align-items: flex-start;
  }
}
