/* ============================================================
   Resume Builder — premium dark app chrome
   ============================================================ */

:root {
  /* base dark palette — warm near-black */
  --bg-0: #08080b;        /* page void */
  --bg-1: #0e0e13;        /* base surface */
  --bg-2: #15151c;        /* elevated panel */
  --bg-3: #1d1d26;        /* raised control */
  --bg-4: #26262f;        /* hover */
  --line: rgba(255,255,255,0.08);
  --line-2: rgba(255,255,255,0.14);

  --ink: #f5f4f8;         /* primary text */
  --ink-2: #b6b4c2;       /* secondary */
  --ink-3: #76747f;       /* muted */
  --ink-4: #4a4954;       /* faint */

  /* accent — tweakable via --acc / --acc-2 set on :root by JS */
  --acc: #e6e600;
  --acc-2: #7deb00;
  --acc-ink: #0a0a0f;
  --acc-soft: color-mix(in oklab, var(--acc) 16%, transparent);
  --acc-glow: color-mix(in oklab, var(--acc) 40%, transparent);

  --radius-s: 10px;
  --radius: 16px;
  --radius-l: 24px;
  --radius-xl: 32px;

  --shadow-1: 0 1px 2px rgba(0,0,0,0.4);
  --shadow-2: 0 8px 30px rgba(0,0,0,0.45);
  --shadow-3: 0 24px 70px -12px rgba(0,0,0,0.7);

  --font-display: "Poppins", system-ui, sans-serif;
  --font-ui: "Poppins", system-ui, sans-serif;
  --font-serif: "Instrument Serif", Georgia, serif;
  --font-mono: "Space Mono", ui-monospace, monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-2: cubic-bezier(0.65, 0, 0.35, 1);
}

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

html, body {
  height: 100%;
  background: var(--bg-0);
  color: var(--ink);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

#root { min-height: 100%; }

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea { font-family: inherit; }
a { color: inherit; text-decoration: none; }

/* Résumé & cover-letter documents keep their own curated type system
   (each of the 100 templates is designed around these faces) — the
   Poppins switch above only restyles the app/website chrome. */
.paper, .cover {
  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-ui: "Manrope", system-ui, sans-serif;
}

::selection { background: var(--acc-glow); color: #fff; }

/* scrollbars */
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: var(--bg-3); border-radius: 20px; border: 2px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-thumb:hover { background: var(--bg-4); background-clip: content-box; }

/* ===== atmospheric backdrop ===== */
.app-shell { position: relative; min-height: 100vh; overflow-x: hidden; background: var(--bg-0); }
.bg-aura {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(60% 50% at 15% 0%, color-mix(in oklab, var(--acc) 22%, transparent), transparent 70%),
    radial-gradient(50% 45% at 90% 10%, color-mix(in oklab, var(--acc-2) 18%, transparent), transparent 70%),
    radial-gradient(70% 60% at 50% 120%, color-mix(in oklab, var(--acc) 10%, transparent), transparent 70%);
  filter: saturate(1.1);
}
.bg-grain {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

/* ===== shared atoms ===== */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink-3);
  display: inline-flex; align-items: center; gap: 8px;
}
.eyebrow::before {
  content: ""; width: 18px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--acc), var(--acc-2));
  display: inline-block;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-weight: 600; font-size: 14px; letter-spacing: -0.01em;
  padding: 12px 20px; border-radius: 999px;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.2s;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: linear-gradient(120deg, var(--acc), var(--acc-2));
  color: var(--acc-ink);
  box-shadow: 0 6px 24px -6px var(--acc-glow), inset 0 1px 0 rgba(255,255,255,0.25);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 36px -8px var(--acc-glow), inset 0 1px 0 rgba(255,255,255,0.3); }
.btn-ghost { background: var(--bg-3); color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--bg-4); border-color: var(--line-2); }
.btn-quiet { color: var(--ink-2); padding: 12px 16px; }
.btn-quiet:hover { color: var(--ink); }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-lg { padding: 16px 28px; font-size: 15px; }

.chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 12px; border-radius: 999px;
  background: var(--bg-2); border: 1px solid var(--line);
  font-size: 12px; font-weight: 600; color: var(--ink-2);
}

.glass {
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
  border: 1px solid var(--line);
  backdrop-filter: blur(20px);
}

/* ===== top nav ===== */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 32px;
  background: color-mix(in oklab, var(--bg-0) 72%, transparent);
  backdrop-filter: blur(18px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 11px; font-family: var(--font-display); font-weight: 700; font-size: 18px; letter-spacing: -0.02em; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(135deg, var(--acc), var(--acc-2));
  display: grid; place-items: center; color: var(--acc-ink);
  box-shadow: 0 4px 14px -4px var(--acc-glow);
  position: relative; overflow: hidden;
}
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-link { padding: 9px 14px; border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--ink-2); transition: 0.2s; }
.nav-link:hover { color: var(--ink); background: var(--bg-2); }
.nav-link.active { color: var(--ink); }
.nav-actions { display: flex; align-items: center; gap: 10px; }

/* mobile hamburger + dropdown menu */
.nav-burger { display: none; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-2); align-items: center; justify-content: center; flex-shrink: 0; }
.burger { position: relative; width: 18px; height: 12px; display: block; }
.burger i { position: absolute; left: 0; width: 100%; height: 2px; border-radius: 2px; background: var(--ink); transition: 0.25s var(--ease); }
.burger i:nth-child(1) { top: 0; }
.burger i:nth-child(2) { top: 5px; }
.burger i:nth-child(3) { top: 10px; }
.burger.open i:nth-child(1) { top: 5px; transform: rotate(45deg); }
.burger.open i:nth-child(2) { opacity: 0; }
.burger.open i:nth-child(3) { top: 5px; transform: rotate(-45deg); }
.nav-menu {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 49;
  display: flex; flex-direction: column; gap: 2px; padding: 10px;
  background: color-mix(in oklab, var(--bg-1) 97%, transparent);
  backdrop-filter: blur(18px) saturate(1.2);
  border-bottom: 1px solid var(--line); box-shadow: var(--shadow-2);
  animation: navMenuIn 0.18s var(--ease);
}
@keyframes navMenuIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.nav-menu-link { padding: 13px 14px; border-radius: 10px; font-size: 15px; font-weight: 600; color: var(--ink-2); text-align: left; }
.nav-menu-link:hover, .nav-menu-link.active { color: var(--ink); background: var(--bg-2); }

@media (max-width: 720px) {
  .nav { padding: 14px 18px; }
  .nav-links { display: none; }
  .nav-burger { display: flex; }
}
@media (max-width: 480px) {
  .nav-cta { display: none; }
}

/* page wrapper */
.page { position: relative; z-index: 1; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 32px; }
@media (max-width: 720px) { .wrap { padding: 0 18px; } }

/* ===== brand wordmark ===== */
.brand-tld { color: var(--ink-3); font-weight: 600; }

/* ===== legal pages (privacy / refund) ===== */
.legal { max-width: 840px; padding-top: 40px; padding-bottom: 90px; }
.legal-back { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-3); font-size: 13px; font-weight: 600; padding: 8px 12px; border-radius: 9px; border: 1px solid var(--line); background: var(--bg-2); margin-bottom: 26px; transition: 0.15s; }
.legal-back:hover { color: var(--ink); border-color: var(--ink-4); }
.legal-head h1 { font-family: var(--font-display); font-size: clamp(30px, 5vw, 44px); font-weight: 700; letter-spacing: -0.02em; margin-top: 10px; }
.legal-updated { color: var(--ink-3); font-size: 12.5px; margin-top: 12px; font-weight: 500; }
.legal-intro { font-size: 15px; line-height: 1.6; color: var(--ink-2); margin-top: 18px; max-width: 62ch; }
.legal-body { margin-top: 38px; display: flex; flex-direction: column; gap: 30px; }
.legal-sec h2 { font-family: var(--font-display); font-size: 18px; font-weight: 700; letter-spacing: -0.01em; color: var(--ink); margin-bottom: 9px; }
.legal-sec p { font-size: 14.5px; line-height: 1.72; color: var(--ink-2); max-width: 70ch; }
.legal-sec ul { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; max-width: 70ch; }
.legal-sec li { position: relative; padding-left: 18px; font-size: 14.5px; line-height: 1.65; color: var(--ink-2); }
.legal-sec li::before { content: ""; position: absolute; left: 0; top: 9px; width: 6px; height: 6px; border-radius: 2px; background: linear-gradient(135deg, var(--acc), var(--acc-2)); }
.legal-sec b { color: var(--ink); font-weight: 700; }
.legal a { color: var(--acc); font-weight: 600; }
.legal a:hover { text-decoration: underline; }
.legal-foot { margin-top: 54px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; font-size: 13px; color: var(--ink-3); }
.legal-foot button { display: inline-flex; align-items: center; gap: 7px; color: var(--acc); font-weight: 600; font-size: 13.5px; }

/* ===== contact page ===== */
.contact { max-width: 1080px; padding-top: 40px; padding-bottom: 96px; }
.contact-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 40px; margin-top: 22px; align-items: start; }
.contact-h1 { font-family: var(--font-display); font-size: clamp(30px, 4.4vw, 44px); font-weight: 700; letter-spacing: -0.025em; margin-top: 12px; line-height: 1.02; }
.contact-lead { font-size: 15.5px; line-height: 1.62; color: var(--ink-2); margin-top: 16px; max-width: 42ch; }
.contact-channels { display: flex; flex-direction: column; gap: 12px; margin-top: 32px; }
.contact-channel { display: flex; align-items: center; gap: 14px; padding: 15px 16px; border-radius: var(--radius); background: var(--bg-2); border: 1px solid var(--line); transition: 0.2s var(--ease); }
a.contact-channel:hover { border-color: color-mix(in oklab, var(--acc) 50%, var(--line)); transform: translateY(-2px); }
.cc-ic { flex-shrink: 0; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--acc-soft); color: var(--acc); }
.cc-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.cc-label { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
.cc-value { font-size: 14.5px; font-weight: 600; color: var(--ink); }
.cc-sub { font-size: 12.5px; color: var(--ink-3); }

.contact-card { position: relative; padding: 32px; border-radius: calc(var(--radius-l) + 6px); background: linear-gradient(180deg, var(--bg-2), var(--bg-1)); border: 1px solid color-mix(in oklab, var(--acc) 20%, var(--line)); box-shadow: 0 30px 80px -34px color-mix(in oklab, var(--acc) 45%, transparent), inset 0 1px 0 rgba(255,255,255,0.04); }
.contact-form { display: flex; flex-direction: column; gap: 20px; }
.cf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cf-field { display: flex; flex-direction: column; gap: 8px; }
.cf-label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.cf-input { width: 100%; padding: 12px 14px; border-radius: var(--radius); background: var(--bg-0); border: 1px solid var(--line); color: var(--ink); font-family: inherit; font-size: 14.5px; transition: border-color 0.18s, box-shadow 0.18s; }
.cf-input::placeholder { color: var(--ink-4); }
.cf-input:focus { outline: none; border-color: var(--acc); box-shadow: 0 0 0 3px color-mix(in oklab, var(--acc) 22%, transparent); }
.cf-input.err { border-color: #ff6b6b; }
.cf-textarea { resize: vertical; min-height: 120px; line-height: 1.5; }
.cf-err { font-size: 12px; color: #ff8a8a; }
.cf-topics { display: flex; flex-wrap: wrap; gap: 8px; }
.cf-topic { padding: 8px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--ink-2); background: var(--bg-0); border: 1px solid var(--line); transition: 0.15s var(--ease); }
.cf-topic:hover { border-color: var(--ink-4); color: var(--ink); }
.cf-topic.on { color: #14140a; background: linear-gradient(135deg, var(--acc), var(--acc-2)); border-color: transparent; }
.cf-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 2px; }
.cf-note { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-3); }
.cf-submit:disabled { opacity: 0.45; cursor: not-allowed; }

.contact-sent { text-align: center; padding: 28px 16px; display: flex; flex-direction: column; align-items: center; animation: contactPop 0.4s var(--ease) both; }
@keyframes contactPop { from { transform: scale(0.97); } to { transform: none; } }
.contact-sent-ic { width: 66px; height: 66px; border-radius: 20px; display: grid; place-items: center; background: var(--acc-soft); color: var(--acc); box-shadow: 0 0 0 1px color-mix(in oklab, var(--acc) 40%, transparent), 0 14px 34px -10px color-mix(in oklab, var(--acc) 60%, transparent); }
.contact-sent h2 { font-family: var(--font-display); font-size: 24px; font-weight: 700; letter-spacing: -0.02em; margin-top: 20px; }
.contact-sent p { font-size: 14.5px; line-height: 1.6; color: var(--ink-2); margin: 10px 0 22px; max-width: 38ch; }
.contact-sent b { color: var(--ink); }
.contact-reset { margin-top: 16px; font-size: 13.5px; font-weight: 600; color: var(--ink-3); }
.contact-reset:hover { color: var(--ink); }

@media (max-width: 820px) {
  .contact-grid { grid-template-columns: 1fr; gap: 28px; }
  .cf-row { grid-template-columns: 1fr; }
  .contact-card { padding: 22px; }
}

/* entrance */
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: none; } }
.rise { animation: rise 0.7s var(--ease) both; }
.fade { animation: fade 0.6s var(--ease) both; }

/* Fallback: if the animation timeline never advances (inactive tab, PDF/print,
   screenshot capture), JS adds .ready after load to guarantee content is shown. */
.ready .rise, .ready .fade,
.ready .stage-paper, .ready .float-card,
.ready .feat-card, .ready .tpl-card { opacity: 1 !important; }
