:root {
  --ink: #0c1f2e;
  --ink-soft: #243b53;
  --mist: #e8eef4;
  --paper: #f4f7fa;
  --fog: #d9e2ec;
  --line: rgba(12, 31, 46, 0.12);
  --teal: #0f766e;
  --teal-deep: #0b5c56;
  --sand: #c4a574;
  --danger: #9b2c2c;
  --ok: #276749;
  --shadow: 0 18px 50px rgba(12, 31, 46, 0.08);
  --radius: 14px;
  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Figtree", "Segoe UI", sans-serif;
  --max: 1120px;
  color-scheme: light;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(15, 118, 110, 0.14), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(196, 165, 116, 0.18), transparent 50%),
    linear-gradient(165deg, #e7eef5 0%, var(--paper) 42%, #edf2f7 100%);
  background-attachment: fixed;
  line-height: 1.5;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  z-index: 0;
}

a {
  color: var(--teal-deep);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--ink);
}

img {
  max-width: 100%;
  display: block;
}

.shell {
  position: relative;
  z-index: 1;
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 0;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.55rem;
  color: inherit;
  text-decoration: none;
}

.brand__mark {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 2.4vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
}

.brand__mark span {
  color: var(--teal);
}

.brand__tag {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  opacity: 0.75;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.35rem 1rem;
  flex-wrap: wrap;
}

.nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}

.nav a:hover {
  color: var(--ink);
}

.btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.7rem 1.25rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  text-decoration: none;
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--ink);
  color: #f7fafc;
  box-shadow: 0 10px 24px rgba(12, 31, 46, 0.22);
}

.btn--primary:hover {
  background: var(--teal-deep);
  color: #fff;
}

.btn--ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}

.btn--ghost:hover {
  border-color: var(--ink-soft);
}

.btn--teal {
  background: var(--teal);
  color: #fff;
}

.btn--teal:hover {
  background: var(--teal-deep);
  color: #fff;
}

.btn--danger {
  background: transparent;
  border-color: rgba(155, 44, 44, 0.35);
  color: var(--danger);
}

.btn--sm {
  padding: 0.45rem 0.9rem;
  font-size: 0.9rem;
}

.hero {
  min-height: calc(100vh - 5.5rem);
  display: grid;
  align-content: center;
  gap: 1.25rem;
  padding: 2rem 0 4rem;
  position: relative;
  isolation: isolate;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 8% -8% auto auto;
  width: min(48vw, 420px);
  aspect-ratio: 4 / 5;
  border-radius: 28px;
  background:
    linear-gradient(145deg, rgba(15, 118, 110, 0.2), rgba(12, 31, 46, 0.55)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='500'%3E%3Crect fill='%230c1f2e' width='400' height='500'/%3E%3Ctext x='40' y='90' fill='%23e8eef4' font-family='Georgia' font-size='34'%3EAlex Rivera%3C/text%3E%3Ctext x='40' y='125' fill='%239fb3c8' font-family='sans-serif' font-size='14'%3ESoftware Engineer%3C/text%3E%3Crect x='40' y='160' width='80' height='2' fill='%230f766e'/%3E%3Crect x='40' y='190' width='280' height='8' rx='2' fill='%23334e68'/%3E%3Crect x='40' y='210' width='240' height='8' rx='2' fill='%23334e68'/%3E%3Crect x='40' y='250' width='120' height='8' rx='2' fill='%230f766e'/%3E%3Crect x='40' y='280' width='260' height='6' rx='2' fill='%23486581'/%3E%3Crect x='40' y='300' width='220' height='6' rx='2' fill='%23486581'/%3E%3Crect x='40' y='340' width='120' height='8' rx='2' fill='%230f766e'/%3E%3Crect x='40' y='370' width='250' height='6' rx='2' fill='%23486581'/%3E%3C/svg%3E")
      center / cover;
  box-shadow: var(--shadow);
  z-index: -1;
  animation: float-in 900ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes float-in {
  from {
    opacity: 0;
    transform: translate(24px, 18px) rotate(2deg);
  }
  to {
    opacity: 1;
    transform: translate(0, 0) rotate(0deg);
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero__brand {
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 9vw, 5.6rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 0.95;
  margin: 0;
  max-width: 12ch;
  animation: rise 700ms ease both;
}

.hero__brand span {
  color: var(--teal);
}

.hero__lead {
  max-width: 34ch;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--ink-soft);
  margin: 0;
  animation: rise 800ms 80ms ease both;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
  animation: rise 850ms 140ms ease both;
}

.section {
  padding: 3.5rem 0;
}

.section__title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  letter-spacing: -0.03em;
  margin: 0 0 0.5rem;
}

.section__lead {
  margin: 0 0 1.75rem;
  color: var(--ink-soft);
  max-width: 48ch;
}

.panel {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}

.panel--pad {
  padding: 1.5rem;
}

.stack {
  display: grid;
  gap: 1rem;
}

.stack--lg {
  gap: 1.5rem;
}

.grid-2 {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 820px) {
  .hero::after {
    position: relative;
    inset: auto;
    width: min(100%, 320px);
    margin: 1rem 0 0;
    animation: rise 700ms ease both;
  }

  .hero {
    min-height: auto;
    padding-top: 1.5rem;
  }

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

.field {
  display: grid;
  gap: 0.35rem;
}

.field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
  font: inherit;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
}

.field textarea {
  min-height: 110px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid rgba(15, 118, 110, 0.35);
  border-color: var(--teal);
}

.muted {
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.flash {
  padding: 0.85rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.8);
}

.flash--error {
  border-color: rgba(155, 44, 44, 0.35);
  color: var(--danger);
  background: rgba(155, 44, 44, 0.06);
}

.flash--ok {
  border-color: rgba(39, 103, 73, 0.35);
  color: var(--ok);
  background: rgba(39, 103, 73, 0.08);
}

.auth-wrap {
  max-width: 420px;
  margin: 2.5rem auto 4rem;
  padding: 1.75rem;
  animation: rise 500ms ease both;
}

.auth-wrap h1 {
  font-family: var(--font-display);
  font-size: 2rem;
  letter-spacing: -0.03em;
  margin: 0 0 0.35rem;
}

.app-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin: 0.5rem 0 1.5rem;
}

.app-bar h1 {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  margin: 0;
  letter-spacing: -0.03em;
}

.resume-list {
  display: grid;
  gap: 0.85rem;
}

.resume-item {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.15rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 160ms ease, transform 160ms ease;
}

.resume-item:hover {
  border-color: rgba(15, 118, 110, 0.45);
  transform: translateY(-1px);
}

.resume-item h2 {
  margin: 0;
  font-size: 1.1rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(15, 118, 110, 0.12);
  color: var(--teal-deep);
}

.theme-pick {
  display: grid;
  gap: 0.75rem;
}

.theme-option {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem;
  background: rgba(255, 255, 255, 0.7);
  cursor: pointer;
}

.theme-option input {
  position: absolute;
  opacity: 0;
}

.theme-option:has(input:checked) {
  border-color: var(--teal);
  box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.2);
}

.theme-option strong {
  display: block;
  margin-bottom: 0.2rem;
}

.builder {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
  align-items: start;
}

@media (max-width: 900px) {
  .builder {
    grid-template-columns: 1fr;
  }
}

.side-actions {
  position: sticky;
  top: 1rem;
  display: grid;
  gap: 1rem;
}

.progress {
  height: 6px;
  border-radius: 999px;
  background: var(--fog);
  overflow: hidden;
}

.progress > span {
  display: block;
  height: 100%;
  width: 30%;
  background: linear-gradient(90deg, var(--teal), var(--sand));
  animation: indeterminate 1.2s ease infinite;
}

@keyframes indeterminate {
  0% {
    transform: translateX(-120%);
  }
  100% {
    transform: translateX(320%);
  }
}

.version-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--line);
}

.version-row:last-child {
  border-bottom: 0;
}

.pricing-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.price-card {
  padding: 1.35rem;
  display: grid;
  gap: 0.75rem;
  align-content: start;
}

.price-card h2 {
  font-family: var(--font-display);
  margin: 0;
  font-size: 1.5rem;
}

.price-card .amount {
  font-size: 1.35rem;
  font-weight: 700;
}

.site-footer {
  padding: 2.5rem 0 3rem;
  color: var(--ink-soft);
  font-size: 0.9rem;
  border-top: 1px solid var(--line);
  margin-top: 2rem;
}

.htmx-indicator {
  display: none;
}

.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
  display: inline-block;
}

.empty {
  padding: 2rem;
  text-align: center;
  color: var(--ink-soft);
}
