/* ATS-Friendly Resume Styles */

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

body {
  font-family: 'Segoe UI', 'Calibri', 'Arial', sans-serif;
  font-size: 11pt;
  line-height: 1.45;
  color: #1a1a2e;
  background: #e8eaed;
}

/* ─── Auth Gate ─── */
.resume-gate {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0f172a;
  padding: 20px;
}
.gate-card {
  background: #fff;
  border-radius: 12px;
  padding: 40px;
  width: min(100%, 380px);
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.gate-card h1 { font-size: 1.3rem; margin-bottom: 8px; color: #0f172a; }
.gate-card p { color: #64748b; font-size: 0.9rem; margin-bottom: 20px; }
.gate-card input {
  width: 100%; padding: 12px 14px; border: 1px solid #cbd5e1;
  border-radius: 8px; font-size: 0.95rem; margin-bottom: 12px;
}
.gate-card button {
  width: 100%; padding: 12px; background: #4f46e5; color: #fff;
  border: none; border-radius: 8px; font-weight: 600; font-size: 0.95rem;
  cursor: pointer;
}
.gate-card button:hover { background: #4338ca; }
.gate-error { color: #ef4444; font-size: 0.85rem; margin-bottom: 8px; }
.back-link { display: inline-block; margin-top: 16px; color: #64748b; font-size: 0.85rem; text-decoration: none; }
.back-link:hover { color: #4f46e5; }

/* ─── Toolbar ─── */
.resume-toolbar {
  max-width: 8.5in;
  margin: 20px auto 0;
  display: flex;
  gap: 10px;
  padding: 0 20px;
}
.toolbar-btn {
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  border: none;
  background: #4f46e5;
  color: #fff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.toolbar-btn:hover { background: #4338ca; }
.toolbar-btn.secondary { background: #fff; color: #334155; border: 1px solid #cbd5e1; }
.toolbar-btn.secondary:hover { background: #f8fafc; }

/* ─── Resume Page ─── */
.resume-document { padding-bottom: 40px; }

.resume-page {
  max-width: 8.5in;
  margin: 20px auto;
  padding: 0.6in 0.7in;
  background: #ffffff;
  box-shadow: 0 4px 24px rgba(0,0,0,0.1);
}

.resume-header {
  text-align: center;
  border-bottom: 2px solid #4f46e5;
  padding-bottom: 14px;
  margin-bottom: 18px;
}
.resume-header h1 {
  font-size: 22pt;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #0f172a;
  margin-bottom: 4px;
}
.resume-subtitle {
  font-size: 11pt;
  color: #475569;
  font-weight: 500;
  margin-bottom: 8px;
}
.resume-contact {
  font-size: 9.5pt;
  color: #334155;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 16px;
}
.resume-contact span::before { content: '• '; color: #94a3b8; }
.resume-contact span:first-child::before { content: ''; }

.resume-section { margin-bottom: 16px; }
.resume-section h2 {
  font-size: 11pt;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #4f46e5;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 3px;
  margin-bottom: 8px;
}
.resume-section p { font-size: 10pt; color: #334155; }

/* Skills */
.skill-row {
  display: flex;
  gap: 8px;
  margin-bottom: 4px;
  font-size: 10pt;
}
.skill-row strong {
  min-width: 100px;
  color: #0f172a;
  flex-shrink: 0;
}
.skill-row span { color: #334155; }

/* Education & Projects */
.resume-item { margin-bottom: 10px; }
.resume-item-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px;
}
.resume-item-header h3 {
  font-size: 10.5pt;
  font-weight: 700;
  color: #0f172a;
}
.resume-item-header .date {
  font-size: 9.5pt;
  color: #64748b;
  font-weight: 500;
}
.resume-item .institution {
  font-size: 10pt;
  color: #475569;
  font-style: italic;
  margin-bottom: 2px;
}
.resume-item p, .resume-item .grade {
  font-size: 9.5pt;
  color: #334155;
}
.resume-item .tech {
  font-size: 9pt;
  color: #64748b;
  margin-top: 2px;
}

.resume-section ul {
  list-style: disc;
  padding-left: 18px;
}
.resume-section li {
  font-size: 10pt;
  color: #334155;
  margin-bottom: 3px;
}

/* ─── Print Styles ─── */
@media print {
  body { background: #fff; }
  .no-print, .resume-gate { display: none !important; }
  .resume-document { padding: 0; }
  .resume-page {
    margin: 0;
    padding: 0.5in 0.6in;
    box-shadow: none;
    max-width: 100%;
  }
  .resume-section { page-break-inside: avoid; }
  .resume-item { page-break-inside: avoid; }
  @page {
    size: letter;
    margin: 0.4in;
  }
}

@media screen and (max-width: 600px) {
  .resume-page { padding: 24px 20px; margin: 10px; }
  .resume-contact { flex-direction: column; align-items: center; gap: 4px; }
  .resume-contact span::before { content: ''; }
}
