:root {
  --bg: #f6f8fb;
  --text: #142033;
  --muted: #5a6a82;
  --panel: rgba(255, 255, 255, 0.62);
  --line: rgba(16, 30, 52, 0.12);
  --accent: #2574f5;
  --accent-2: #85b5ff;
  --ok: #11663d;
  --err: #8a1f27;
  --shadow: 0 16px 45px rgba(30, 61, 110, 0.14);
  --glass: saturate(170%) blur(14px);
}

* {
  box-sizing: border-box;
}

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

body {
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 10%, rgba(178, 213, 255, 0.55) 0, transparent 46%),
    radial-gradient(circle at 90% 12%, rgba(208, 235, 255, 0.55) 0, transparent 44%),
    radial-gradient(circle at 90% 88%, rgba(229, 238, 255, 0.9) 0, transparent 45%),
    linear-gradient(160deg, #f8fbff 0%, #f1f6fc 42%, #eef4fb 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.24) 0%,
    rgba(255, 255, 255, 0) 28%,
    rgba(255, 255, 255, 0.18) 100%
  );
  z-index: -2;
}

.aurora {
  position: fixed;
  width: 45vw;
  height: 45vw;
  border-radius: 999px;
  filter: blur(64px);
  opacity: 0.55;
  z-index: -1;
  animation: float 16s ease-in-out infinite;
}

.aurora-1 {
  left: -12vw;
  top: -12vw;
  background: rgba(144, 191, 255, 0.72);
}

.aurora-2 {
  right: -12vw;
  bottom: -12vw;
  background: rgba(209, 234, 255, 0.88);
  animation-delay: -6s;
}

@keyframes float {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(2vw, -2vh, 0) scale(1.07);
  }
}

.container {
  width: min(980px, 92vw);
  margin: 0 auto;
  padding: 30px 0 54px;
}

.hero h1,
h2,
h3 {
  font-family: "Fraunces", serif;
}

.hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 18px;
  margin-bottom: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 16px;
  box-shadow: var(--shadow);
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
}

.hero-main {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.hero h1 {
  margin: 0 0 8px;
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1;
}

.hero-text {
  margin: 0 0 16px;
  max-width: 64ch;
  color: var(--muted);
}

.nav-tabs {
  display: flex;
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.68);
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
}

.nav-btn {
  border: none;
  border-radius: 999px;
  padding: 9px 14px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  color: var(--muted);
  background: transparent;
}

.nav-btn-active {
  color: #fff;
  box-shadow: 0 6px 18px rgba(37, 116, 245, 0.28);
  background: linear-gradient(120deg, var(--accent), #4e95ff);
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.panel:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 48px rgba(30, 61, 110, 0.16);
  border-color: rgba(54, 116, 212, 0.2);
}

h2 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: clamp(1.3rem, 2.3vw, 1.75rem);
}

label {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
  font-weight: 600;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 13px;
  font: inherit;
  color: var(--text);
  background: rgba(255, 255, 255, 0.85);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: rgba(37, 116, 245, 0.5);
  box-shadow: 0 0 0 4px rgba(37, 116, 245, 0.14);
}

.experience-form {
  display: grid;
  gap: 6px;
}

.date-field input,
.date-field .flatpickr-input {
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.96), rgba(239, 247, 255, 0.92));
}

input[type="file"] {
  padding: 8px;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.96), rgba(239, 247, 255, 0.92));
}

input[type="file"]::file-selector-button {
  border: 1px solid rgba(39, 72, 120, 0.22);
  border-radius: 999px;
  padding: 8px 12px;
  margin-right: 10px;
  font: inherit;
  font-weight: 700;
  color: #1f3f73;
  cursor: pointer;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.98), rgba(222, 236, 255, 0.94));
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

input[type="file"]::file-selector-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(37, 116, 245, 0.16);
}

.date-field {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

.field-action-btn {
  border: 1px solid rgba(39, 72, 120, 0.22);
  border-radius: 999px;
  padding: 9px 12px;
  font: inherit;
  font-weight: 700;
  color: #1f3f73;
  cursor: pointer;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.98), rgba(222, 236, 255, 0.94));
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.field-action-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(37, 116, 245, 0.16);
}

.flatpickr-calendar {
  border: 1px solid rgba(39, 72, 120, 0.2);
  border-radius: 16px;
  box-shadow: 0 20px 45px rgba(30, 61, 110, 0.18);
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
}

.flatpickr-months .flatpickr-month,
.flatpickr-current-month .flatpickr-monthDropdown-months,
.flatpickr-current-month input.cur-year {
  color: #1b3965;
  font-weight: 700;
}

.flatpickr-day {
  border-radius: 10px;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
  border-color: var(--accent);
  background: var(--accent);
}

.flatpickr-day:hover {
  background: rgba(37, 116, 245, 0.15);
  border-color: rgba(37, 116, 245, 0.1);
}

.file-field {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
}

.file-input-hidden {
  display: none;
}

.file-btn {
  margin: 0;
  width: fit-content;
  border: 1px solid rgba(39, 72, 120, 0.22);
  border-radius: 999px;
  padding: 9px 12px;
  font: inherit;
  font-weight: 700;
  color: #1f3f73;
  cursor: pointer;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.98), rgba(222, 236, 255, 0.94));
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.file-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(37, 116, 245, 0.16);
}

.file-meta {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
}

.btn {
  width: fit-content;
  border: none;
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  background: linear-gradient(120deg, var(--accent), #4e95ff);
  color: #fff;
  box-shadow: 0 10px 24px rgba(37, 116, 245, 0.25);
  transition: transform 0.18s ease, filter 0.18s ease, box-shadow 0.18s ease;
}

.btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.02);
  box-shadow: 0 14px 30px rgba(37, 116, 245, 0.28);
}

.btn-secondary {
  box-shadow: none;
  color: #2a3d57;
  border: 1px solid rgba(39, 72, 120, 0.2);
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.95), rgba(235, 244, 255, 0.9));
}

.timeline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

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

.section-list {
  display: grid;
  gap: 14px;
}

.section-group {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.section-head h3 {
  margin: 0;
}

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

.experience-item {
  margin: 0;
}

.experience-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

.experience-link {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--text);
  font: inherit;
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}

.experience-link:hover {
  transform: translateY(-1px);
  border-color: rgba(54, 116, 212, 0.35);
  background: rgba(255, 255, 255, 0.88);
}

.item-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.action-btn {
  border: 1px solid rgba(39, 72, 120, 0.2);
  border-radius: 999px;
  padding: 8px 10px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  color: #214571;
  background: rgba(255, 255, 255, 0.92);
}

.action-btn:hover {
  background: rgba(232, 243, 255, 0.95);
}

.action-danger {
  color: #7f1e2f;
  border-color: rgba(146, 28, 53, 0.24);
}

.action-danger:hover {
  background: rgba(255, 233, 237, 0.92);
}

.detail-body {
  display: grid;
  gap: 12px;
}

.subpanel {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.62);
  margin-bottom: 14px;
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
}

.create-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.subpanel h3 {
  margin-top: 0;
}

.inline-form {
  display: grid;
  gap: 10px;
}

.form-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

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

.section-manage-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.75);
}

.detail-date {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.chip-inline {
  width: fit-content;
}

.slideshow {
  display: grid;
  gap: 10px;
}

.slide-image {
  width: 100%;
  border-radius: 12px;
  max-height: 440px;
  object-fit: cover;
  border: 1px solid var(--line);
}

.slide-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.72);
}

.card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.card-title {
  margin: 0;
  font-size: 1.06rem;
}

.chip {
  font-size: 0.8rem;
  color: var(--muted);
  border: 1px solid rgba(39, 72, 120, 0.18);
  background: rgba(255, 255, 255, 0.66);
  padding: 3px 8px;
  border-radius: 999px;
}

.card p {
  margin: 0;
  color: #2f2924;
}

.card img {
  width: 100%;
  border-radius: 12px;
  max-height: 380px;
  object-fit: cover;
  border: 1px solid var(--line);
}

.card a {
  color: var(--accent);
  font-weight: 700;
}

.status {
  min-height: 1.2em;
  margin: 8px 0 0;
  font-size: 0.94rem;
  font-weight: 600;
}

.status-ok {
  color: var(--ok);
}

.status-err {
  color: var(--err);
}

dialog {
  border: none;
  border-radius: 18px;
  width: min(640px, 94vw);
  padding: 0;
  box-shadow: var(--shadow);
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(4px);
}

.config-form {
  padding: 18px;
}

.config-form h3 {
  margin-top: 0;
}

.config-help {
  color: var(--muted);
  margin-top: 0;
}

.config-actions {
  margin-top: 12px;
  display: flex;
  gap: 10px;
}

.reveal {
  opacity: 0;
  transform: translateY(12px);
  animation: reveal 0.5s ease forwards;
}

.reveal:nth-child(2) {
  animation-delay: 0.1s;
}

.reveal:nth-child(3) {
  animation-delay: 0.2s;
}

@keyframes reveal {
  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 720px) {
  .container {
    padding-top: 18px;
  }

  .hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .timeline-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .card-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .experience-row {
    grid-template-columns: 1fr;
  }

  .item-actions {
    width: 100%;
  }

  .action-btn {
    flex: 1;
  }

  .section-manage-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .btn {
    width: 100%;
    text-align: center;
  }

  .date-field {
    grid-template-columns: 1fr;
  }

  .file-field {
    grid-template-columns: 1fr;
  }

  .nav-tabs {
    width: 100%;
  }

  .nav-btn {
    flex: 1;
  }

  .slide-controls {
    flex-direction: column;
    align-items: stretch;
  }
}
