:root {
  --bg: #f4f5f7;
  --panel: #ffffff;
  --text: #1e1f24;
  --accent: #f2771a;
  --muted: #5b6270;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(900px 400px at -10% -20%, color-mix(in srgb, var(--accent) 20%, white 80%), transparent 65%),
    linear-gradient(170deg, #ffffff 0%, var(--bg) 60%);
}

.resume-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 32px auto 60px;
  display: grid;
  grid-template-columns: 310px 1fr;
  gap: 18px;
  align-items: start;
}

.profile-card {
  position: sticky;
  top: 18px;
  background: var(--panel);
  border-radius: 24px;
  padding: 22px;
  border: 1px solid color-mix(in srgb, var(--text) 10%, white 90%);
  box-shadow: 0 10px 25px rgba(16, 20, 30, 0.08);
}

.photo-ring {
  width: 170px;
  aspect-ratio: 1;
  margin: 0 auto 14px;
  border-radius: 50%;
  padding: 6px;
  background: linear-gradient(145deg, var(--accent), color-mix(in srgb, var(--accent) 35%, #ffffff 65%));
}

.photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  border-radius: 50%;
  background: #113155;
}

.profile-card h1 {
  margin: 0;
  text-align: center;
  font-family: "Source Serif 4", serif;
  font-size: 2rem;
  line-height: 1.05;
}

.title {
  margin: 10px 0 5px;
  text-align: center;
  font-weight: 700;
}

.location {
  margin: 0 0 14px;
  text-align: center;
  color: var(--muted);
}

.contact-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.contact-list li {
  border: 1px solid color-mix(in srgb, var(--text) 8%, white 92%);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 0.92rem;
  background: #fcfcfd;
}

.profile-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.profile-links a {
  text-align: center;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text);
  background: color-mix(in srgb, var(--accent) 12%, white 88%);
  border-radius: 10px;
  padding: 8px;
}

.content {
  display: grid;
  gap: 14px;
}

.section {
  background: var(--panel);
  border-radius: 22px;
  padding: 22px;
  border: 1px solid color-mix(in srgb, var(--text) 10%, white 90%);
  box-shadow: 0 10px 25px rgba(16, 20, 30, 0.06);
}

.kicker {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--accent);
}

.intro > p:last-of-type {
  margin: 0;
  line-height: 1.6;
  color: color-mix(in srgb, var(--text) 90%, #687284 10%);
}

.metrics {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.metric-pill {
  font-size: 0.84rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 7px 11px;
  background: color-mix(in srgb, var(--accent) 15%, white 85%);
  color: color-mix(in srgb, var(--text) 86%, white 14%);
}

h2 {
  margin: 0 0 12px;
  font-size: 1.12rem;
}

.timeline {
  display: grid;
  gap: 16px;
}

.timeline-item {
  border: 1px solid color-mix(in srgb, var(--text) 10%, white 90%);
  border-radius: 16px;
  padding: 14px 14px 12px;
  background: color-mix(in srgb, var(--panel) 92%, white 8%);
}

.timeline-company {
  margin: 0;
  font-size: 2rem;
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.timeline-role {
  margin: 4px 0 0;
  font-size: 1.75rem;
  line-height: 1.2;
  font-weight: 500;
}

.timeline-period {
  margin: 10px 0 10px;
  font-size: 1.7rem;
  color: color-mix(in srgb, var(--text) 88%, #6b7385 12%);
  font-weight: 600;
}

.bullet-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.bullet-list li {
  position: relative;
  padding-left: 14px;
  line-height: 1.45;
}

.bullet-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.54em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.edit-toggle {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 20;
  border: none;
  background: var(--text);
  color: #fff;
  border-radius: 999px;
  padding: 10px 15px;
  font-weight: 700;
  cursor: pointer;
}

.auth-badge {
  position: fixed;
  right: 14px;
  bottom: 64px;
  z-index: 20;
  font-size: 0.74rem;
  border-radius: 999px;
  padding: 6px 10px;
  background: #ffffff;
  color: #2a3040;
  border: 1px solid #d7ddea;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.whatsapp-float {
  position: fixed;
  left: 14px;
  bottom: 14px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #25d366;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
  z-index: 21;
}

.whatsapp-float svg {
  width: 30px;
  height: 30px;
  fill: currentColor;
}

.editor {
  position: fixed;
  top: 0;
  right: 0;
  width: min(450px, 94vw);
  height: 100dvh;
  background: #121317;
  color: #eceef5;
  transform: translateX(105%);
  transition: transform 0.25s ease;
  z-index: 50;
  display: grid;
  grid-template-rows: auto 1fr auto;
  border-left: 1px solid #2f3442;
}

.editor.open {
  transform: translateX(0);
}

.editor-head {
  padding: 14px 16px;
  border-bottom: 1px solid #2f3442;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.editor-head h3 {
  margin: 0;
}

.logout-btn {
  border: 1px solid #3a4050;
  background: transparent;
  color: #e9edf8;
  border-radius: 8px;
  padding: 6px 9px;
  cursor: pointer;
  font-size: 0.8rem;
}

.editor-body {
  padding: 14px 16px;
  overflow: auto;
  display: grid;
  gap: 10px;
}

.editor label {
  display: grid;
  gap: 5px;
  font-size: 0.85rem;
}

.editor label:has(input[type="checkbox"]) {
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px;
}

.editor input,
.editor textarea {
  border-radius: 10px;
  border: 1px solid #3a4050;
  background: #1f2430;
  color: #f4f6ff;
  padding: 8px 9px;
  width: 100%;
  font-family: inherit;
}

.editor input[type="checkbox"] {
  width: 16px;
  height: 16px;
}

.small-btn {
  border: 1px solid #3a4050;
  background: #2a3243;
  color: #f4f6ff;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.small-btn.danger {
  background: #4a2329;
  border-color: #69343c;
}

.experience-editor-wrap {
  border: 1px solid #30384d;
  border-radius: 12px;
  padding: 10px;
  display: grid;
  gap: 10px;
  background: #191f2a;
}

.experience-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 700;
}

.experience-editor-list {
  display: grid;
  gap: 12px;
}

.experience-editor-item {
  border: 1px solid #35415a;
  border-radius: 10px;
  padding: 10px;
  display: grid;
  gap: 8px;
  background: #1e2634;
}

.experience-editor-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.exp-dates {
  display: grid;
  gap: 8px;
}

.exp-date-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.exp-date-fields select {
  border-radius: 10px;
  border: 1px solid #3a4050;
  background: #1f2430;
  color: #f4f6ff;
  padding: 8px 9px;
  width: 100%;
  font-family: inherit;
}

.exp-current-label {
  display: flex !important;
  align-items: center;
  gap: 8px;
}

.experience-tasks-wrap {
  border: 1px solid #35415a;
  border-radius: 10px;
  padding: 8px;
  display: grid;
  gap: 8px;
  background: #161c27;
}

.experience-tasks-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 700;
}

.exp-tasks-list {
  display: grid;
  gap: 8px;
}

.exp-task-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.color-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr;
}

.editor-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 12px 16px 14px;
  border-top: 1px solid #2f3442;
}

.editor-actions button {
  border: none;
  border-radius: 10px;
  padding: 10px;
  cursor: pointer;
  font-weight: 700;
}

#saveBtn {
  background: var(--accent);
  color: #fff;
}

#resetBtn {
  background: #2d3445;
  color: #fff;
}

.auth-modal {
  border: none;
  padding: 0;
  border-radius: 14px;
  width: min(420px, calc(100vw - 28px));
}

.auth-modal::backdrop {
  background: rgba(10, 14, 20, 0.5);
}

.auth-card {
  margin: 0;
  padding: 18px;
  background: #0f121a;
  color: #eaf0ff;
  display: grid;
  gap: 10px;
}

.auth-card h3 {
  margin: 0;
}

.auth-card p {
  margin: 0;
  color: #afbbd5;
  font-size: 0.9rem;
}

.auth-card label {
  display: grid;
  gap: 4px;
  font-size: 0.86rem;
}

.auth-card input {
  border-radius: 10px;
  border: 1px solid #313a4f;
  background: #1c2433;
  color: #fff;
  padding: 9px 10px;
}

.auth-actions {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr;
}

.auth-actions button {
  border: none;
  border-radius: 10px;
  padding: 9px 10px;
  cursor: pointer;
  font-weight: 700;
}

.auth-actions button.secondary {
  background: #2a3246;
  color: #f2f5ff;
}

#authLoginBtn {
  background: var(--accent);
  color: #fff;
}

#authMessage {
  min-height: 18px;
  color: #b5c4e6;
}

@media (max-width: 940px) {
  .resume-shell {
    grid-template-columns: 1fr;
  }

  .profile-card {
    position: static;
  }

  .photo-ring {
    width: 134px;
  }

  .two-col {
    grid-template-columns: 1fr;
  }
}
