/* =========================================================
   MIDSOFT ATS CHECK — DESIGN SYSTEM
   Display: Sora | Body: Inter | Mono: JetBrains Mono
   ========================================================= */

:root{
  --bg:#0b0e14;
  --bg-2:#10141d;
  --surface:#151a24;
  --surface-2:#1a2030;
  --border:#28304a;
  --text:#eef1fb;
  --text-dim:#9aa3c0;
  --text-faint:#5c6486;

  /* Google 4-color palette */
  --google-blue:#4285F4;
  --google-red:#EA4335;
  --google-yellow:#FBBC05;
  --google-green:#34A853;

  --accent-1:#4285F4;
  --accent-2:#34A853;
  --accent-grad: linear-gradient(120deg, var(--google-blue), var(--google-green) 45%, var(--google-yellow) 75%, var(--google-red));

  --good:#34A853;
  --warn:#FBBC05;
  --bad:#EA4335;

  --radius-sm:10px;
  --radius-md:16px;
  --radius-lg:24px;
  --shadow-soft: 0 10px 40px -12px rgba(0,0,0,.55);
  --shadow-glow: 0 0 0 1px rgba(255,255,255,.04), 0 20px 60px -20px rgba(66,133,244,.35);

  --font-display:'Sora', sans-serif;
  --font-body:'Inter', sans-serif;
  --font-mono:'JetBrains Mono', monospace;
}

[data-theme="light"]{
  --bg:#f5f6fb;
  --bg-2:#eef0fa;
  --surface:#ffffff;
  --surface-2:#f7f8fd;
  --border:#e3e6f3;
  --text:#171a2b;
  --text-dim:#5b6180;
  --text-faint:#9297b3;
  --shadow-soft: 0 10px 30px -14px rgba(30,30,60,.18);
  --shadow-glow: 0 0 0 1px rgba(30,30,60,.04), 0 20px 60px -24px rgba(66,133,244,.25);
}

*,*::before,*::after{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family:var(--font-body);
  line-height:1.6;
  transition:background .4s ease, color .4s ease;
  overflow-x:hidden;
}
h1,h2,h3,h4{ font-family:var(--font-display); margin:0; letter-spacing:-0.02em; }
p{ margin:0; }
a{ color:inherit; text-decoration:none; }
ul{ margin:0; padding:0; list-style:none; }
button{ font-family:inherit; cursor:pointer; }
input,select{ font-family:inherit; }
::selection{ background:var(--accent-1); color:#fff; }

.hidden{ display:none !important; }

/* ---------------- background fx ---------------- */
.bg-grid{
  position:fixed; inset:0; z-index:-2;
  background-image:
    linear-gradient(to right, rgba(120,130,170,.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(120,130,170,.06) 1px, transparent 1px);
  background-size:44px 44px;
  mask-image:radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
}
.bg-glow{ position:fixed; z-index:-1; border-radius:50%; filter:blur(110px); opacity:.35; pointer-events:none; }
.bg-glow-1{ width:520px; height:520px; background:var(--accent-1); top:-160px; left:-120px; }
.bg-glow-2{ width:480px; height:480px; background:var(--accent-2); top:220px; right:-160px; opacity:.22; }

/* ---------------- layout helpers ---------------- */
.section{ padding:96px 24px; position:relative; }
.section.alt{ background:linear-gradient(180deg, transparent, rgba(120,130,170,.04) 20%, rgba(120,130,170,.04) 80%, transparent); }
.section-inner{ max-width:1080px; margin:0 auto; }
.step-tag{
  display:inline-block; font-family:var(--font-mono); font-size:12px; letter-spacing:.14em;
  text-transform:uppercase; color:var(--accent-2); background:rgba(34,211,238,.09);
  border:1px solid rgba(34,211,238,.25); padding:5px 12px; border-radius:100px; margin-bottom:16px;
}
.section-title{ font-size:clamp(28px,4vw,40px); font-weight:700; margin-bottom:10px; }
.section-desc{ color:var(--text-dim); font-size:16px; max-width:640px; }

/* ---------------- buttons ---------------- */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding:13px 26px; border-radius:100px; font-weight:600; font-size:14.5px;
  border:1px solid transparent; transition:transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
  white-space:nowrap;
}
.btn:active{ transform:scale(.97); }
.btn:focus-visible{ outline:2px solid var(--accent-2); outline-offset:3px; }
.btn-primary{ background:var(--accent-grad); color:#fff; box-shadow:0 8px 24px -8px rgba(66,133,244,.55); }
.btn-primary:hover{ box-shadow:0 12px 32px -8px rgba(66,133,244,.75); transform:translateY(-2px); }
.btn-outline{ background:transparent; border-color:var(--border); color:var(--text); }
.btn-outline:hover{ border-color:var(--accent-1); color:var(--accent-2); }
.btn-ghost{ background:var(--surface-2); color:var(--text); border-color:var(--border); }
.btn-ghost:hover{ background:var(--surface); }
.icon-btn{
  width:38px; height:38px; border-radius:50%; display:flex; align-items:center; justify-content:center;
  background:var(--surface-2); border:1px solid var(--border); color:var(--text); transition:all .2s;
}
.icon-btn:hover{ color:var(--accent-2); border-color:var(--accent-1); }

/* ---------------- navbar ---------------- */
.navbar{ position:sticky; top:0; z-index:50; backdrop-filter:blur(14px); background:color-mix(in srgb, var(--bg) 72%, transparent); border-bottom:1px solid var(--border); }
.navbar-inner{ max-width:1180px; margin:0 auto; display:flex; align-items:center; justify-content:space-between; padding:14px 24px; }
.brand{ display:flex; align-items:center; gap:10px; font-family:var(--font-display); font-size:17px; }
.brand-mark{
  width:34px; height:34px; border-radius:10px; background:var(--accent-grad); color:#fff;
  display:flex; align-items:center; justify-content:center; font-weight:800; font-size:16px;
  box-shadow:0 6px 16px -4px rgba(66,133,244,.65);
}
.brand-name b{ color:var(--accent-2); font-weight:700; }
.nav-actions{ display:flex; align-items:center; gap:14px; }

/* ---------------- hero ---------------- */
.hero{ padding:110px 24px 70px; text-align:center; }
.hero-inner{ max-width:800px; margin:0 auto; }
.eyebrow{
  display:inline-flex; align-items:center; gap:8px; font-family:var(--font-mono); font-size:12.5px;
  color:var(--text-dim); background:var(--surface); border:1px solid var(--border); padding:7px 16px;
  border-radius:100px; margin-bottom:26px;
}
.eyebrow .dot{ width:7px; height:7px; border-radius:50%; background:var(--good); box-shadow:0 0 0 3px rgba(51,214,159,.2); animation:pulse 2s infinite; }
@keyframes pulse{ 0%,100%{ opacity:1; } 50%{ opacity:.4; } }
.hero-title{ font-size:clamp(44px,7vw,74px); font-weight:800; line-height:1.05; margin-bottom:14px; }
.grad-text{ background:var(--accent-grad); -webkit-background-clip:text; background-clip:text; color:transparent; }
.hero-subtitle{ font-family:var(--font-mono); font-size:15px; color:var(--accent-2); letter-spacing:.06em; margin-bottom:20px; }
.hero-desc{ color:var(--text-dim); font-size:17px; max-width:600px; margin:0 auto 34px; }
.hero-cta{ display:flex; justify-content:center; gap:14px; flex-wrap:wrap; margin-bottom:54px; }
.hero-stats{ display:flex; justify-content:center; gap:50px; flex-wrap:wrap; }
.hero-stat{ display:flex; flex-direction:column; }
.hero-stat-num{ font-family:var(--font-display); font-size:30px; font-weight:800; background:var(--accent-grad); -webkit-background-clip:text; background-clip:text; color:transparent; }
.hero-stat-label{ font-size:13px; color:var(--text-faint); }

/* ---------------- how it works ---------------- */
.how-grid{ display:grid; grid-template-columns:repeat(4,1fr); gap:20px; margin-top:36px; }
.how-card{ background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-md); padding:26px 22px; transition:transform .25s ease, border-color .25s ease; }
.how-card:hover{ transform:translateY(-4px); border-color:var(--accent-1); }
.how-num{ font-family:var(--font-mono); color:var(--accent-2); font-size:13px; margin-bottom:14px; }
.how-card h3{ font-size:18px; margin-bottom:8px; }
.how-card p{ color:var(--text-dim); font-size:14px; }

/* ---------------- upload / dropzone ---------------- */
.role-select-row{ margin:30px 0 26px; display:flex; flex-wrap:wrap; align-items:center; gap:14px; }
.role-label{ font-weight:600; font-size:14px; color:var(--text-dim); }
.role-select, .role-custom-input{
  background:var(--surface); border:1px solid var(--border); color:var(--text);
  padding:11px 16px; border-radius:var(--radius-sm); font-size:14.5px; min-width:260px;
  transition:border-color .2s;
}
.role-select:focus, .role-custom-input:focus{ outline:none; border-color:var(--accent-1); }
.role-custom-input{ min-width:340px; flex:1; }

.dropzone{
  border:2px dashed var(--border); border-radius:var(--radius-lg); padding:56px 24px;
  text-align:center; background:var(--surface); transition:all .25s ease; cursor:pointer;
}
.dropzone:hover, .dropzone.dragover{ border-color:var(--accent-1); background:var(--surface-2); box-shadow:var(--shadow-glow); }
.dropzone:focus-visible{ outline:2px solid var(--accent-2); outline-offset:4px; }
.dropzone-icon{ color:var(--accent-2); margin-bottom:14px; }
.dropzone-title{ font-family:var(--font-display); font-size:19px; font-weight:600; margin-bottom:4px; }
.dropzone-sub{ color:var(--text-faint); font-size:13px; margin:8px 0; }
.dropzone-meta{ color:var(--text-faint); font-size:12.5px; margin-top:16px; }

.file-chip{
  display:inline-flex; align-items:center; gap:10px; background:var(--surface-2); border:1px solid var(--border);
  padding:10px 16px; border-radius:100px; margin-top:18px; font-size:14px; animation:fadeUp .35s ease;
}
.chip-x{ background:none; border:none; color:var(--text-faint); font-size:13px; margin-left:6px; }
.chip-x:hover{ color:var(--bad); }

.analyze-row{ margin-top:22px; animation:fadeUp .35s ease; }
.btn-analyze{ padding:15px 34px; font-size:15.5px; }

.loader{ display:flex; flex-direction:column; align-items:center; gap:16px; margin-top:34px; animation:fadeUp .4s ease; }
.loader-ring{ width:44px; height:44px; border-radius:50%; border:4px solid var(--border); border-top-color:var(--accent-1); animation:spin .9s linear infinite; }
@keyframes spin{ to{ transform:rotate(360deg); } }
@keyframes fadeUp{ from{ opacity:0; transform:translateY(10px); } to{ opacity:1; transform:translateY(0); } }

/* ---------------- results ---------------- */
.results{ animation:fadeUp .5s ease; }
.results-header{ display:flex; justify-content:space-between; align-items:flex-end; flex-wrap:wrap; gap:20px; margin-bottom:34px; }
.results-actions{ display:flex; gap:10px; flex-wrap:wrap; }

.card{
  background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-lg);
  padding:28px; margin-bottom:22px; box-shadow:var(--shadow-soft);
}
.card-title{ font-size:18px; margin-bottom:18px; }

.score-hero{ display:flex; align-items:center; gap:44px; flex-wrap:wrap; padding:36px; }
.score-circle-wrap{ position:relative; width:200px; height:200px; flex-shrink:0; }
.score-circle{ width:200px; height:200px; transform:rotate(-90deg); }
.score-circle-bg{ fill:none; stroke:var(--border); stroke-width:14; }
.score-circle-fg{
  fill:none; stroke:url(#none); stroke:var(--accent-1); stroke-width:14; stroke-linecap:round;
  stroke-dasharray:540; stroke-dashoffset:540; transition:stroke-dashoffset 1.4s cubic-bezier(.16,1,.3,1), stroke 1s ease;
}
.score-circle-label{ position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; }
.score-num{ font-family:var(--font-display); font-size:52px; font-weight:800; }
.score-of{ color:var(--text-faint); font-size:13px; font-family:var(--font-mono); }
.score-hero-info{ flex:1; min-width:240px; }
.score-hero-info h3{ font-size:24px; margin-bottom:8px; }
.score-hero-info p{ color:var(--text-dim); font-size:15px; margin-bottom:16px; }
.verdict-badge{
  display:inline-block; font-family:var(--font-mono); font-size:13px; font-weight:600; padding:8px 16px;
  border-radius:100px; background:var(--surface-2); border:1px solid var(--border);
}
.verdict-badge.good{ color:var(--good); border-color:rgba(51,214,159,.4); background:rgba(51,214,159,.08); }
.verdict-badge.warn{ color:var(--warn); border-color:rgba(255,182,72,.4); background:rgba(255,182,72,.08); }
.verdict-badge.bad{ color:var(--bad); border-color:rgba(255,101,119,.4); background:rgba(255,101,119,.08); }

.cards-grid{ display:grid; grid-template-columns:repeat(4,1fr); gap:18px; margin-bottom:22px; }
.mini-card{ background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-md); padding:20px; }
.mini-card-top{ display:flex; justify-content:space-between; align-items:baseline; margin-bottom:10px; }
.mini-card-title{ font-size:13.5px; color:var(--text-dim); font-weight:600; }
.mini-card-score{ font-family:var(--font-mono); font-size:15px; font-weight:700; }
.bar-track{ height:8px; border-radius:100px; background:var(--border); overflow:hidden; }
.bar-fill{ height:100%; border-radius:100px; background:var(--accent-grad); width:0%; transition:width 1.1s cubic-bezier(.16,1,.3,1); }

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

.tag-list{ display:flex; flex-wrap:wrap; gap:9px; }
.tag{
  font-family:var(--font-mono); font-size:12.5px; padding:6px 13px; border-radius:100px;
  background:rgba(51,214,159,.09); border:1px solid rgba(51,214,159,.35); color:var(--good);
}
.tag-list.missing .tag{ background:rgba(255,101,119,.08); border-color:rgba(255,101,119,.35); color:var(--bad); }
.tag-empty{ color:var(--text-faint); font-size:14px; }

.contact-grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); gap:14px; }
.contact-item{ display:flex; align-items:center; gap:10px; padding:12px 14px; border-radius:var(--radius-sm); background:var(--surface-2); border:1px solid var(--border); }
.contact-item .status-icon{ width:20px; height:20px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:12px; flex-shrink:0; }
.contact-item.found .status-icon{ background:rgba(51,214,159,.15); color:var(--good); }
.contact-item.missing .status-icon{ background:rgba(255,101,119,.15); color:var(--bad); }
.contact-item.missing{ opacity:.75; }
.contact-item span.label{ font-size:13.5px; font-weight:500; }

.skills-grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:16px; }
.skill-cat{ background:var(--surface-2); border:1px solid var(--border); border-radius:var(--radius-sm); padding:16px; }
.skill-cat h4{ font-size:13px; color:var(--accent-2); margin-bottom:8px; font-family:var(--font-mono); }
.skill-cat .count{ font-size:22px; font-weight:800; font-family:var(--font-display); }

.list-clean li{ display:flex; gap:10px; padding:9px 0; border-bottom:1px solid var(--border); font-size:14.5px; color:var(--text-dim); }
.list-clean li:last-child{ border-bottom:none; }
.list-clean li::before{ content:'—'; color:var(--accent-1); flex-shrink:0; }

.grammar-item{ padding:14px 0; border-bottom:1px solid var(--border); }
.grammar-item:last-child{ border-bottom:none; }
.grammar-item .g-tag{ display:inline-block; font-family:var(--font-mono); font-size:11px; padding:3px 10px; border-radius:100px; margin-bottom:8px; background:rgba(255,182,72,.1); color:var(--warn); border:1px solid rgba(255,182,72,.3); }
.grammar-item p{ font-size:14px; color:var(--text-dim); }
.grammar-clean{ color:var(--good); font-size:14.5px; }

.suggestions-grid{ display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.suggestion-item{ display:flex; gap:12px; padding:14px 16px; background:var(--surface-2); border:1px solid var(--border); border-radius:var(--radius-sm); font-size:14px; color:var(--text-dim); }
.suggestion-item .s-num{ font-family:var(--font-mono); color:var(--accent-2); font-weight:700; flex-shrink:0; }

/* ---------------- footer ---------------- */
.site-footer{ text-align:center; padding:34px 24px; color:var(--text-faint); font-size:13px; border-top:1px solid var(--border); }

/* ---------------- confetti ---------------- */
#confettiCanvas{ position:fixed; inset:0; pointer-events:none; z-index:999; }

/* ---------------- toast ---------------- */
.toast{
  position:fixed; bottom:26px; left:50%; transform:translateX(-50%); background:var(--surface); color:var(--text);
  border:1px solid var(--border); padding:13px 22px; border-radius:100px; font-size:14px; box-shadow:var(--shadow-soft);
  z-index:1000; animation:fadeUp .3s ease;
}

/* ---------------- responsive ---------------- */
@media (max-width:900px){
  .how-grid{ grid-template-columns:repeat(2,1fr); }
  .cards-grid{ grid-template-columns:repeat(2,1fr); }
  .two-col, .suggestions-grid{ grid-template-columns:1fr; }
}
@media (max-width:600px){
  .how-grid{ grid-template-columns:1fr; }
  .cards-grid{ grid-template-columns:1fr; }
  .score-hero{ justify-content:center; text-align:center; }
  .score-hero-info{ text-align:center; }
  .hero{ padding:80px 18px 50px; }
  .section{ padding:64px 18px; }
  .role-custom-input{ min-width:100%; }
}

@media (prefers-reduced-motion: reduce){
  *{ animation-duration:.001ms !important; transition-duration:.001ms !important; }
}

@media print{
  .navbar, .hero, .section.alt, #upload, .results-actions, .site-footer, .bg-grid, .bg-glow{ display:none !important; }
  body{ background:#fff; color:#000; }
  .card{ box-shadow:none; border:1px solid #ccc; break-inside:avoid; }
}
