/* =========================================================
   DESIGN TOKENS
========================================================= */
:root {
  --bg: #070B14;
  --bg2: #0D1117;
  --bg3: #111827;
  --bg4: #1A2235;
  --card: #111927;
  --card-border: #1F2D45;
  --accent: #3B82F6;
  --accent2: #06B6D4;
  --accent3: #8B5CF6;
  --accent4: #10B981;
  --danger: #EF4444;
  --warning: #F59E0B;
  --text: #F0F6FF;
  --text2: #94A3B8;
  --text3: #64748B;
  --border: #1E2D40;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 4px 24px rgba(0,0,0,.4);
  --shadow-lg: 0 8px 48px rgba(0,0,0,.6);
  --transition: .2s cubic-bezier(.4,0,.2,1);
  --font: 'Inter', sans-serif;
  --font-serif: 'DM Serif Display', serif;
  --font-mono: 'JetBrains Mono', monospace;
  --nav-h: 64px;
}

/* =========================================================
   BASE
========================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font-family: var(--font); cursor: pointer; border: none; outline: none; }
input, textarea, select {
  font-family: var(--font);
  font-size: .95rem;
  color: var(--text);
  background: var(--bg3);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: .75rem 1rem;
  width: 100%;
  transition: border-color var(--transition), box-shadow var(--transition);
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}
input::placeholder, textarea::placeholder { color: var(--text3); }
textarea { resize: vertical; min-height: 100px; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='%2364748B' d='M7 7l3 3 3-3'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .75rem center; background-size: 1.2rem; }
img { max-width: 100%; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--text3); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 5rem 0; }
.gradient-text { background: linear-gradient(135deg, var(--accent), var(--accent2)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.text-accent { color: var(--accent); }

/* =========================================================
   VIEWS
========================================================= */
.view { display: none; min-height: 100vh; }
.view.active { display: block; }
#view-builder.active, #view-preview.active { display: flex; flex-direction: column; }

/* =========================================================
   BUTTONS
========================================================= */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .6rem 1.2rem; border-radius: 10px; font-weight: 600;
  font-size: .9rem; transition: all var(--transition); white-space: nowrap;
}
.btn-primary {
  background: var(--accent); color: #fff;
  box-shadow: 0 4px 15px rgba(59,130,246,.35);
}
.btn-primary:hover { background: #2563EB; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(59,130,246,.45); }
.btn-ghost { background: transparent; color: var(--text2); border: 1.5px solid var(--border); }
.btn-ghost:hover { background: var(--bg3); color: var(--text); border-color: var(--text3); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #DC2626; }
.btn-xl { padding: .875rem 1.75rem; font-size: 1rem; border-radius: 12px; }
.btn-sm { padding: .45rem .9rem; font-size: .85rem; }
.btn-text-danger { background: none; border: none; color: var(--danger); font-size: .85rem; font-weight: 500; display: flex; align-items: center; gap: .4rem; opacity: .7; transition: opacity var(--transition); padding: 0; }
.btn-text-danger:hover { opacity: 1; }

/* =========================================================
   NAVBAR
========================================================= */
#navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  min-height: var(--nav-h);
  background: rgba(7,11,20,.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-container {
  max-width: 1200px; margin: 0 auto; padding: 0 1.5rem;
  height: var(--nav-h); display: flex; align-items: center; gap: 1.5rem;
}
.nav-logo { display: flex; align-items: center; gap: .6rem; font-size: 1.2rem; font-weight: 800; color: var(--text); }
.logo-mark {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff; font-weight: 900; font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.logo-mark.sm { width: 28px; height: 28px; font-size: .85rem; border-radius: 7px; }
.nav-links { display: flex; align-items: center; gap: 1.25rem; margin-left: 1rem; flex: 1; }
.nav-link { color: var(--text2); font-size: .92rem; font-weight: 500; transition: color var(--transition); }
.nav-link:hover, .nav-link.active-link, .nav-link.active { color: var(--accent); }
.nav-cta { margin-left: auto; display: flex; align-items: center; }
.mobile-menu-btn {
  display: none; margin-left: auto; background: rgba(255,255,255,.05);
  border: 1px solid var(--border); color: var(--text); font-size: 1.15rem;
  width: 40px; height: 40px; border-radius: 8px;
  align-items: center; justify-content: center;
  transition: all var(--transition); cursor: pointer;
}
.mobile-menu-btn:hover { background: rgba(255,255,255,.1); color: var(--accent); border-color: rgba(59,130,246,.3); }
.mobile-nav {
  display: none; flex-direction: column; background: var(--bg2);
  border-top: 1px solid var(--border); padding: 1rem 1.5rem; gap: .4rem;
  box-shadow: var(--shadow);
}
.mobile-nav a {
  color: var(--text2); font-size: .95rem; font-weight: 500;
  padding: .65rem .75rem; border-radius: 8px;
  transition: all var(--transition); display: flex; align-items: center; justify-content: space-between;
}
.mobile-nav a:hover, .mobile-nav a.active-link, .mobile-nav a.active {
  color: var(--accent); background: rgba(59,130,246,.08);
}
.mobile-nav .mobile-cta-btn {
  margin-top: .5rem; justify-content: center;
}
.mobile-nav.open { display: flex; }

/* =========================================================
   HERO
========================================================= */
.hero {
  position: relative; min-height: 100vh; display: flex; align-items: center;
  padding: calc(var(--nav-h) + 2rem) 0 4rem; overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-gradient-mesh {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 60% 40%, rgba(59,130,246,.12) 0%, transparent 70%),
              radial-gradient(ellipse 60% 50% at 20% 70%, rgba(139,92,246,.1) 0%, transparent 65%),
              radial-gradient(ellipse 50% 40% at 80% 80%, rgba(6,182,212,.08) 0%, transparent 60%);
}
.grid-overlay {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 20%, transparent 100%);
}
.orb {
  position: absolute; border-radius: 50%; filter: blur(60px);
  animation: orb-float 8s ease-in-out infinite;
}
.orb-1 { width: 500px; height: 500px; background: rgba(59,130,246,.08); top: -100px; right: 0; animation-delay: 0s; }
.orb-2 { width: 400px; height: 400px; background: rgba(139,92,246,.07); bottom: 0; left: -100px; animation-delay: -3s; }
.orb-3 { width: 300px; height: 300px; background: rgba(6,182,212,.06); top: 40%; right: 20%; animation-delay: -5s; }
@keyframes orb-float { 0%,100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-30px) scale(1.05); } }
.hero .container { position: relative; z-index: 1; }
.hero-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.hero-badge {
  display: inline-flex; align-items: center; gap: .6rem;
  background: rgba(59,130,246,.1); border: 1px solid rgba(59,130,246,.25);
  border-radius: 99px; padding: .4rem 1rem; font-size: .8rem;
  color: var(--accent2); font-weight: 500; margin-bottom: 1.5rem;
  animation: fade-up .6s ease both;
}
.badge-pulse {
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent2);
  animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.5;transform:scale(.8)} }
.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 900; line-height: 1.1; letter-spacing: -.02em;
  margin-bottom: 1.25rem;
  animation: fade-up .6s ease .1s both;
}
.underline-text {
  position: relative; display: inline-block;
  background: linear-gradient(135deg, var(--accent), var(--accent2)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-subtitle {
  font-size: 1.1rem; color: var(--text2); max-width: 520px;
  margin-bottom: 2rem; line-height: 1.7;
  animation: fade-up .6s ease .2s both;
}
.hero-btns { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 2.5rem; animation: fade-up .6s ease .3s both; }
.hero-stats { display: flex; align-items: center; gap: 1.5rem; animation: fade-up .6s ease .4s both; }
.stat-item { display: flex; flex-direction: column; }
.stat-item strong { font-size: 1.4rem; font-weight: 800; color: var(--text); }
.stat-item span { font-size: .78rem; color: var(--text3); font-weight: 500; }
.stat-sep { width: 1px; height: 36px; background: var(--border); }
/* Floating Resume Card */
.hero-visual { position: relative; display: flex; justify-content: center; align-items: center; animation: fade-up .6s ease .2s both; }
.floating-card {
  background: rgba(17,25,39,.85); backdrop-filter: blur(20px);
  border: 1px solid var(--card-border); border-radius: 16px;
  box-shadow: var(--shadow-lg); overflow: hidden;
  animation: float 6s ease-in-out infinite;
}
@keyframes float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-12px)} }
.resume-mock { display: flex; width: 340px; height: 220px; }
.mock-sidebar { width: 110px; background: #0F1929; padding: 14px 12px; display: flex; flex-direction: column; gap: 8px; }
.mock-avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent2)); margin-bottom: 4px; }
.mock-body { flex: 1; padding: 14px 12px; display: flex; flex-direction: column; gap: 7px; background: #111927; }
.mock-bar { height: 5px; border-radius: 99px; background: rgba(255,255,255,.12); }
.mock-bar.w100 { width: 100%; }.mock-bar.w80{width:80%}.mock-bar.w70{width:70%}.mock-bar.w60{width:60%}.mock-bar.w55{width:55%}.mock-bar.w50{width:50%}.mock-bar.w45{width:45%}.mock-bar.w40{width:40%}.mock-bar.w90{width:90%}.mock-bar.w75{width:75%}
.mock-bar.heading { height: 8px; background: rgba(255,255,255,.18); }
.mock-bar.sub { height: 5px; background: rgba(59,130,246,.3); }
.mock-bar.label { height: 4px; background: rgba(59,130,246,.4); width: 40%; }
.mock-bar.thin { height: 4px; }
.mock-bar.skill-bar { height: 4px; background: rgba(59,130,246,.25); }
.mock-divider { height: 1px; background: rgba(255,255,255,.06); margin: 2px 0; }
.mock-tags-row { display: flex; gap: 4px; flex-wrap: wrap; }
.mock-tag { display: block; height: 14px; width: 40px; border-radius: 99px; background: rgba(59,130,246,.2); }
.mock-name-block { display: flex; flex-direction: column; gap: 5px; }
.mock-section-sm { display: flex; flex-direction: column; gap: 5px; margin-top: 6px; }
.floating-badge {
  position: absolute; display: flex; align-items: center; gap: .5rem;
  background: rgba(17,25,39,.9); backdrop-filter: blur(12px);
  border: 1px solid var(--card-border); border-radius: 10px;
  padding: .5rem .9rem; font-size: .78rem; font-weight: 600;
  box-shadow: 0 4px 16px rgba(0,0,0,.3);
}
.badge-ai { top: -10px; right: -10px; color: var(--accent2); animation: float 5s ease-in-out infinite; }
.badge-pdf { bottom: 10px; left: -20px; color: var(--accent4); animation: float 7s ease-in-out infinite 1s; }
@keyframes fade-up { from{opacity:0;transform:translateY(20px)} to{opacity:1;transform:translateY(0)} }

/* =========================================================
   SECTION HEADERS
========================================================= */
.section-header { text-align: center; max-width: 640px; margin: 0 auto 3.5rem; }
.section-label {
  display: inline-block; padding: .3rem .9rem;
  background: rgba(59,130,246,.1); border: 1px solid rgba(59,130,246,.2);
  border-radius: 99px; font-size: .75rem; font-weight: 600;
  color: var(--accent); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 1rem;
}
.section-title { font-size: clamp(1.8rem, 3.5vw, 2.6rem); font-weight: 800; line-height: 1.2; margin-bottom: .75rem; letter-spacing: -.02em; }
.section-sub { color: var(--text2); font-size: 1rem; line-height: 1.7; }

/* =========================================================
   FEATURES
========================================================= */
.features-section { background: var(--bg2); }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.feature-card {
  background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius-lg);
  padding: 1.75rem; transition: all var(--transition);
}
.feature-card:hover { transform: translateY(-4px); border-color: rgba(59,130,246,.25); box-shadow: 0 12px 36px rgba(0,0,0,.3); }
.feature-icon-wrap {
  width: 52px; height: 52px; border-radius: 14px;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; color: var(--c); margin-bottom: 1.25rem;
  box-shadow: 0 0 20px color-mix(in srgb, var(--c) 30%, transparent);
}
.feature-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: .5rem; }
.feature-card p { color: var(--text2); font-size: .9rem; line-height: 1.6; }

/* =========================================================
   HOW IT WORKS
========================================================= */
.hiw-steps { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; gap: 1rem; }
.hiw-step {
  background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius-lg);
  padding: 2rem 1.5rem; text-align: center; transition: all var(--transition);
}
.hiw-step:hover { transform: translateY(-4px); border-color: rgba(59,130,246,.3); }
.hiw-number { font-size: .75rem; font-weight: 700; color: var(--accent); letter-spacing: .1em; margin-bottom: .5rem; font-family: var(--font-mono); }
.hiw-icon { font-size: 1.8rem; margin-bottom: 1rem; color: var(--accent2); }
.hiw-step h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: .5rem; }
.hiw-step p { color: var(--text2); font-size: .88rem; line-height: 1.6; }
.hiw-connector { display: flex; flex-direction: column; align-items: center; gap: .4rem; color: var(--text3); }
.connector-line { width: 40px; height: 1px; background: linear-gradient(90deg, var(--accent), var(--accent2)); }
.connector-arrow { font-size: .8rem; color: var(--accent); }

/* =========================================================
   TEMPLATES SHOWCASE
========================================================= */
.templates-section { background: var(--bg2); }
.templates-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; margin-bottom: 2.5rem; }
.tpl-card {
  background: var(--card); border: 1.5px solid var(--card-border); border-radius: var(--radius-lg);
  overflow: hidden; cursor: pointer; transition: all var(--transition);
}
.tpl-card:hover { transform: translateY(-6px); border-color: var(--accent); box-shadow: 0 16px 48px rgba(59,130,246,.15); }
.tpl-thumb { height: 180px; overflow: hidden; position: relative; }
.tpl-info { padding: 1rem 1.25rem; }
.tpl-badge { display: inline-block; padding: .2rem .6rem; border-radius: 99px; font-size: .7rem; font-weight: 600; margin-bottom: .4rem; background: rgba(59,130,246,.1); color: var(--accent); }
.tpl-badge.popular { background: rgba(245,158,11,.1); color: var(--warning); }
.tpl-badge.executive { background: rgba(217,119,6,.15); color: #D97706; }
.tpl-badge.tech { background: rgba(6,182,212,.15); color: #06B6D4; }
.tpl-badge.nordic { background: rgba(16,185,129,.15); color: #059669; }
.tpl-badge.modern { background: rgba(139,92,246,.1); color: var(--accent3); }
.tpl-badge.classic { background: rgba(100,116,139,.1); color: var(--text2); }
.tpl-badge.creative { background: rgba(236,72,153,.1); color: #EC4899; }
.tpl-badge.meridian { background: rgba(139,21,56,.15); color: #8B1538; }
.tpl-badge.quantum { background: rgba(99,102,241,.15); color: #6366F1; }
.tpl-badge.solaris { background: rgba(194,65,12,.15); color: #C2410C; }
.tpl-badge.helvetica { background: rgba(220,38,38,.15); color: #DC2626; }
.tpl-badge.crest { background: rgba(30,64,175,.15); color: #1E40AF; }
.tpl-info h3 { font-size: 1rem; font-weight: 700; margin-bottom: .15rem; }
.tpl-info p { font-size: .8rem; color: var(--text3); }
.templates-cta { text-align: center; }

/* Template Thumb: Nexus */
.nexus-preview { background: #0a1628; display: flex; }
.np-sidebar { width: 90px; background: #061020; padding: 10px 8px; display: flex; flex-direction: column; gap: 6px; }
.np-av { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg,#3B82F6,#06B6D4); margin: 0 auto 4px; flex-shrink:0; }
.np-body { flex: 1; padding: 10px 8px; display: flex; flex-direction: column; gap: 5px; }
.np-bar { height: 4px; border-radius: 99px; background: rgba(255,255,255,.12); }
.np-bar.w75{width:75%}.np-bar.w60{width:60%}.np-bar.w50{width:50%}.np-bar.w45{width:45%}.np-bar.w40{width:40%}.np-bar.w95{width:95%}.np-bar.w80{width:80%}.np-bar.w65{width:65%}.np-bar.w35{width:35%}.np-bar.w30{width:30%}.np-bar.w85{width:85%}.np-bar.w70{width:70%}
.np-bar.sm { height: 3px; background: rgba(59,130,246,.3); }
.np-bar.hd { background: rgba(255,255,255,.15); }
.np-gap { height: 6px; }
.np-label { height: 3px; width: 35px; border-radius: 99px; background: rgba(59,130,246,.5); }
.np-section-label { height: 3px; width: 50px; border-radius: 99px; background: rgba(59,130,246,.4); margin-bottom: 3px; }
.np-skill { height: 4px; background: rgba(255,255,255,.08); border-radius: 99px; margin: 2px 0; overflow: hidden; }
.np-skill div { height: 100%; background: linear-gradient(90deg,#3B82F6,#06B6D4); border-radius: 99px; }

/* Template Thumb: Vanguard */
.vanguard-preview { background: #fff; display: flex; flex-direction: column; }
.vp-header { background: linear-gradient(135deg,#0a0f1d,#1e293b); padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.vp-bar { height: 4px; border-radius: 99px; background: rgba(255,255,255,.18); }
.vp-bar.w50{width:50%}.vp-bar.w30{width:30%}.vp-bar.w80{width:80%}.vp-bar.w60{width:60%}.vp-bar.w90{width:90%}.vp-bar.w75{width:75%}
.vp-bar.sm { height: 3px; background: #D97706; }
.vp-bar.hd { background: rgba(0,0,0,.15); }
.vp-rule { height: 3px; background: #D97706; }
.vp-body { flex: 1; display: flex; }
.vp-left { width: 75px; background: #f8fafc; padding: 8px 6px; border-right: 1px solid #e2e8f0; display: flex; flex-direction: column; gap: 5px; }
.vp-badge { width: 30px; height: 8px; border-radius: 3px; background: #0F172A; margin-bottom: 2px; }
.vp-right { flex: 1; padding: 8px 10px; display: flex; flex-direction: column; gap: 5px; background: #fff; }

/* Template Thumb: Silicon */
.silicon-preview { background: #fff; display: flex; flex-direction: column; }
.sip-header { background: #090D16; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.sip-tag { width: 45px; height: 6px; border-radius: 99px; background: rgba(6,182,212,.3); }
.sip-bar { height: 4px; border-radius: 99px; background: rgba(255,255,255,.2); }
.sip-bar.w60{width:60%}.sip-bar.w85{width:85%;background:rgba(0,0,0,.14)}.sip-bar.w70{width:70%;background:rgba(0,0,0,.1)}.sip-bar.w55{width:55%;background:rgba(0,0,0,.08)}
.sip-stack { background: #0F172A; padding: 5px 12px; display: flex; gap: 4px; border-bottom: 1px solid #1E293B; }
.sip-stack span { width: 22px; height: 8px; border-radius: 2px; background: rgba(6,182,212,.3); display: block; }
.sip-body { flex: 1; padding: 10px 12px; display: flex; flex-direction: column; gap: 5px; border-left: 2px solid #06B6D4; margin: 6px 12px; }

/* Template Thumb: Nordic */
.nordic-preview { background: #FAFAF9; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.nop-header { display: flex; flex-direction: column; gap: 4px; }
.nop-bar { height: 4px; border-radius: 99px; background: rgba(0,0,0,.15); }
.nop-bar.w55{width:55%}.nop-bar.w35{width:35%}.nop-bar.w90{width:90%}.nop-bar.w75{width:75%}.nop-bar.w60{width:60%}.nop-bar.w70{width:70%}
.nop-bar.sm { height: 3px; background: #059669; }
.nop-rule { height: 1.5px; background: #18181b; }
.nop-body { flex: 1; display: grid; grid-template-columns: 1.6fr 1fr; gap: 8px; }
.nop-left { display: flex; flex-direction: column; gap: 4px; }
.nop-right { display: flex; flex-direction: column; gap: 4px; }
.nop-tags { display: flex; gap: 3px; }
.nop-tags span { width: 20px; height: 8px; border-radius: 3px; background: rgba(5,150,105,.2); display: block; }

/* Template Thumb: Aurora */
.aurora-preview { background: #f8faff; display: flex; flex-direction: column; }
.ap-header { height: 40px; background: linear-gradient(135deg,#6366F1,#06B6D4); }
.ap-body { flex: 1; display: flex; gap: 0; }
.ap-left { width: 80px; background: #f0f4ff; padding: 8px; display: flex; flex-direction: column; gap: 5px; }
.ap-right { flex: 1; padding: 8px; display: flex; flex-direction: column; gap: 4px; }
.ap-bar { height: 4px; border-radius: 99px; background: rgba(99,102,241,.15); }
.ap-bar.w90{width:90%}.ap-bar.w80{width:80%}.ap-bar.w75{width:75%}.ap-bar.w70{width:70%}.ap-bar.w60{width:60%}.ap-bar.w85{width:85%}.ap-bar.dk{background:rgba(0,0,0,.12)}
.ap-gap { height: 5px; }
.ap-tags { display: flex; gap: 3px; flex-wrap: wrap; }
.ap-tags span { display: block; width: 18px; height: 10px; border-radius: 99px; background: rgba(99,102,241,.2); }

/* Template Thumb: Slate */
.slate-preview { background: #fff; padding: 10px; display: flex; flex-direction: column; gap: 5px; align-items: center; }
.sp-header { display: flex; flex-direction: column; gap: 4px; align-items: center; margin-bottom: 3px; width: 100%; }
.sp-bar { height: 4px; border-radius: 99px; background: rgba(0,0,0,.1); }
.sp-bar.w55{width:55%}.sp-bar.w40{width:40%}.sp-bar.w90{width:90%}.sp-bar.w75{width:75%}.sp-bar.w85{width:85%}.sp-bar.w65{width:65%}
.sp-bar.sm { height: 3px; background: rgba(0,0,0,.07); }
.sp-rule { width: 100%; height: 1px; background: rgba(0,0,0,.1); margin: 2px 0; }
.sp-section-label { width: 40px; height: 3px; border-radius: 99px; background: rgba(0,0,0,.2); align-self: flex-start; margin-bottom: 3px; }

/* Template Thumb: Prism */
.prism-preview { background: #f9f9ff; display: flex; }
.prp-accent { width: 6px; background: linear-gradient(180deg,#8B5CF6,#EC4899); flex-shrink: 0; }
.prp-body { flex: 1; padding: 10px 8px; display: flex; flex-direction: column; gap: 5px; }
.prp-bar { height: 4px; border-radius: 99px; background: rgba(0,0,0,.08); }
.prp-bar.w70{width:70%}.prp-bar.w50{width:50%}.prp-bar.w60{width:60%}.prp-bar.w55{width:55%}.prp-bar.w45{width:45%}
.prp-bar.sm { height: 3px; }
.prp-bar.hd { background: rgba(0,0,0,.15); }
.prp-badges { display: flex; gap: 3px; flex-wrap: wrap; }
.prp-badges span { display: block; width: 22px; height: 10px; border-radius: 99px; background: rgba(139,92,246,.2); }
.prp-timeline { display: flex; flex-direction: column; gap: 5px; margin-top: 3px; }
.prp-item { display: flex; align-items: flex-start; gap: 5px; }
.prp-dot { width: 6px; height: 6px; border-radius: 50%; background: #8B5CF6; flex-shrink: 0; margin-top: 4px; }

/* Template Thumb: Meridian (Ivy League / Finance) */
.meridian-preview { background: #FFFFFF; padding: 12px 14px; display: flex; flex-direction: column; gap: 5px; }
.mp-top-rule { height: 3px; background: #0C1E3D; width: 100%; border-bottom: 1px solid #8B1538; }
.mp-header { display: flex; flex-direction: column; align-items: center; gap: 3px; margin: 2px 0 4px; }
.mp-bar-name { width: 60%; height: 5px; border-radius: 2px; background: #0C1E3D; }
.mp-bar-sub { width: 35%; height: 3px; border-radius: 2px; background: #8B1538; }
.mp-body { flex: 1; display: flex; flex-direction: column; gap: 5px; }
.mp-sec { width: 40%; height: 3px; background: #0C1E3D; border-bottom: 1px solid #8B1538; margin-top: 2px; }
.mp-row { width: 90%; height: 3.5px; background: rgba(12,30,61,.15); border-radius: 2px; }
.mp-row.w75 { width: 75%; }
.mp-row.w60 { width: 60%; }

/* Template Thumb: Quantum (AI & Deep Tech) */
.quantum-preview { background: #0B0F19; display: flex; flex-direction: column; }
.qp-header { background: #090D16; padding: 8px 10px; display: flex; flex-direction: column; gap: 3px; border-bottom: 1px solid #1E293B; }
.qp-tag { width: 40px; height: 5px; border-radius: 3px; background: rgba(6,182,212,.3); }
.qp-name { width: 55%; height: 5px; border-radius: 2px; background: #FFFFFF; }
.qp-body { flex: 1; display: flex; }
.qp-left { width: 70px; background: #0D1424; padding: 6px; display: flex; flex-direction: column; gap: 4px; border-right: 1px solid #1E293B; }
.qp-pill { height: 3px; border-radius: 99px; background: linear-gradient(90deg,#6366F1,#06B6D4); width: 85%; }
.qp-right { flex: 1; padding: 6px 8px; display: flex; flex-direction: column; gap: 4px; }
.qp-card { background: #131B2E; border: 1px solid #1E293B; border-radius: 4px; padding: 4px; height: 28px; }

/* Template Thumb: Solaris (Product & Growth) */
.solaris-preview { background: #FFFFFF; display: flex; flex-direction: column; }
.sop-header { background: linear-gradient(135deg,#9A3412,#EA580C,#F59E0B); padding: 10px 12px; display: flex; flex-direction: column; gap: 3px; }
.sop-name { width: 50%; height: 5px; border-radius: 2px; background: #FFFFFF; }
.sop-sub { width: 30%; height: 3px; border-radius: 2px; background: rgba(255,255,255,.8); }
.sop-banner { background: #FFF7ED; padding: 3px 12px; border-bottom: 1px solid #FFEDD5; display: flex; gap: 4px; }
.sop-banner span { display: block; width: 25%; height: 3px; background: #C2410C; border-radius: 2px; }
.sop-body { flex: 1; padding: 8px 12px; display: grid; grid-template-columns: 1.6fr 1fr; gap: 8px; }
.sop-bar { height: 3.5px; border-radius: 2px; background: rgba(24,24,27,.12); margin-bottom: 3px; }

/* Template Thumb: Helvetica (Swiss Grid) */
.helvetica-preview { background: #FFFFFF; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.hp-header { border-bottom: 2px solid #111111; padding-bottom: 6px; display: flex; justify-content: space-between; align-items: flex-end; }
.hp-badge { width: 6px; height: 6px; background: #DC2626; display: inline-block; margin-bottom: 2px; }
.hp-name { width: 60px; height: 6px; background: #111111; }
.hp-body { flex: 1; display: flex; flex-direction: column; gap: 5px; }
.hp-num-row { display: flex; align-items: center; gap: 4px; border-bottom: 1px solid #111111; padding-bottom: 2px; }
.hp-num { font-size: 5pt; font-weight: 900; color: #DC2626; }
.hp-label { width: 35px; height: 3px; background: #111111; }

/* Template Thumb: Crest (Medical & Advisory) */
.crest-preview { background: #FFFFFF; display: flex; flex-direction: column; }
.cp-header { background: #0F172A; border-bottom: 2px solid #0D9488; padding: 10px 12px; display: flex; flex-direction: column; gap: 3px; }
.cp-name { width: 50%; height: 5px; border-radius: 2px; background: #FFFFFF; }
.cp-sub { width: 35%; height: 3px; border-radius: 2px; background: #38BDF8; }
.cp-body { flex: 1; display: flex; }
.cp-left { width: 70px; background: #F8FAFC; padding: 6px; border-right: 1px solid #E2E8F0; display: flex; flex-direction: column; gap: 4px; }
.cp-badge { height: 4px; background: #FFFFFF; border-left: 2px solid #1E40AF; width: 90%; }
.cp-right { flex: 1; padding: 6px 8px; display: flex; flex-direction: column; gap: 4px; }

/* Career Guide & Tips (SEO & AdSense Content) */
.guide-section { background: var(--bg2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.guide-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.guide-card {
  background: var(--bg); border: 1px solid var(--border); border-radius: 16px;
  padding: 2rem; transition: border-color var(--transition), transform var(--transition);
  display: flex; flex-direction: column;
}
.guide-card:hover { border-color: rgba(59,130,246,.4); transform: translateY(-2px); }
.guide-tag {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em;
  padding: .3rem .65rem; border-radius: 99px; width: fit-content; margin-bottom: 1.25rem;
}
.guide-tag.ats { background: rgba(59,130,246,.12); color: var(--accent); }
.guide-tag.design { background: rgba(139,92,246,.12); color: var(--accent2); }
.guide-tag.writing { background: rgba(6,182,212,.12); color: var(--accent3); }
.guide-tag.career { background: rgba(16,185,129,.12); color: var(--accent4); }
.guide-card h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: .85rem; color: var(--text); line-height: 1.4; }
.guide-card p { font-size: .95rem; color: var(--text2); line-height: 1.65; margin-bottom: 1rem; }
.guide-takeaways { list-style: none; padding: 0; margin-top: auto; display: flex; flex-direction: column; gap: .5rem; border-top: 1px solid var(--border); padding-top: 1rem; }
.guide-takeaways li { font-size: .88rem; color: var(--text2); display: flex; align-items: flex-start; gap: .5rem; }
.guide-takeaways li i { color: var(--accent4); font-size: .85rem; margin-top: 3px; flex-shrink: 0; }

/* FAQ Section */
.faq-section { background: var(--bg); }
.faq-grid { max-width: 840px; margin: 0 auto; display: flex; flex-direction: column; gap: 1rem; }
.faq-item {
  background: var(--bg2); border: 1px solid var(--border); border-radius: 12px;
  overflow: hidden; transition: border-color var(--transition);
}
.faq-item:hover { border-color: rgba(59,130,246,.3); }
.faq-question {
  width: 100%; text-align: left; padding: 1.25rem 1.5rem;
  background: none; border: none; color: var(--text); font-size: 1.05rem; font-weight: 600;
  display: flex; justify-content: space-between; align-items: center; cursor: pointer;
  font-family: 'Inter', sans-serif;
}
.faq-question i { color: var(--accent); transition: transform .3s ease; font-size: .9rem; }
.faq-item.active .faq-question i { transform: rotate(180deg); }
.faq-answer {
  max-height: 0; overflow: hidden; transition: max-height .35s ease, padding .35s ease;
  padding: 0 1.5rem; color: var(--text2); font-size: .95rem; line-height: 1.65;
}
.faq-item.active .faq-answer { max-height: 250px; padding: 0 1.5rem 1.25rem; }

/* CTA & Footer */
.cta-section { background: var(--bg); }
.cta-card {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, rgba(59,130,246,.1), rgba(6,182,212,.08));
  border: 1px solid rgba(59,130,246,.2); border-radius: 24px; padding: 4rem 2rem;
  text-align: center;
}
.cta-glow-1 { position: absolute; width: 400px; height: 400px; border-radius: 50%; background: rgba(59,130,246,.08); filter: blur(80px); top: -100px; left: -100px; pointer-events: none; }
.cta-glow-2 { position: absolute; width: 300px; height: 300px; border-radius: 50%; background: rgba(139,92,246,.07); filter: blur(60px); bottom: -80px; right: -80px; pointer-events: none; }
.cta-inner { position: relative; z-index: 1; }
.cta-card h2 { font-size: clamp(1.8rem,3vw,2.5rem); font-weight: 800; margin-bottom: 1rem; letter-spacing: -.02em; }
.cta-card p { color: var(--text2); max-width: 520px; margin: 0 auto 2rem; }
.site-footer { border-top: 1px solid var(--border); padding: 4rem 0 2rem; background: var(--bg); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 3rem; margin-bottom: 2rem; }
.footer-brand { display: flex; align-items: center; gap: .5rem; font-size: 1.2rem; font-weight: 800; }
.footer-brand-col p { color: var(--text2); font-size: .9rem; margin-top: 1rem; line-height: 1.6; max-width: 400px; }
.footer-links-col h4 { color: var(--text); font-size: 1rem; margin-bottom: 1.25rem; font-weight: 600; }
.footer-links-col a { display: block; color: var(--text2); font-size: .9rem; margin-bottom: .75rem; text-decoration: none; transition: color var(--transition); }
.footer-links-col a:hover { color: var(--accent); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; font-size: .85rem; color: var(--text3); border-top: 1px solid var(--border); padding-top: 1.5rem; margin-top: 1.5rem; flex-wrap: wrap; gap: 1rem; }

/* =========================================================
   PAGE VIEWS (Legal, About, Contact)
========================================================= */
.page-view { background: var(--bg); padding-top: var(--nav-h); padding-bottom: 4rem; }
.page-header { background: var(--bg2); padding: 5rem 0 4rem; border-bottom: 1px solid var(--border); margin-bottom: 3rem; text-align: center; }
.page-header h1 { font-family: 'DM Serif Display', serif; font-size: 2.8rem; margin-bottom: 1rem; color: var(--text); }
.page-header p { color: var(--text2); font-size: 1.1rem; }
.page-content { max-width: 800px; margin: 0 auto; color: var(--text2); line-height: 1.7; }
.page-content h2, .page-content h3 { color: var(--text); margin-top: 2.5rem; margin-bottom: 1rem; font-family: 'Inter', sans-serif; font-weight: 600; }
.page-content h2 { font-size: 1.8rem; }
.page-content h3 { font-size: 1.3rem; }
.page-content p { margin-bottom: 1.25rem; font-size: 1.05rem; }
.page-content strong { color: var(--text); font-weight: 600; }
.page-content a { color: var(--accent); text-decoration: none; font-weight: 500; }
.page-content a:hover { text-decoration: underline; }
.mx-auto { margin-left: auto; margin-right: auto; }
.text-center { text-align: center; }
.contact-form { margin-top: 2rem; }
.contact-form .form-group { margin-bottom: 1.5rem; text-align: left; }
.contact-form label { display: block; margin-bottom: .5rem; color: var(--text); font-weight: 500; font-size: .95rem; }
.contact-form .input { width: 100%; background: var(--bg2); border: 1px solid var(--border); padding: .85rem 1rem; border-radius: 8px; color: var(--text); outline: none; transition: border-color var(--transition); font-family: 'Inter', sans-serif; font-size: 1rem; }
.contact-form .input:focus { border-color: var(--accent); }

/* =========================================================
   BUILDER
========================================================= */
#view-builder { background: var(--bg); padding-top: var(--nav-h); }
.builder-wrap { display: flex; flex: 1; min-height: calc(100vh - var(--nav-h)); }
.builder-aside {
  width: 260px; flex-shrink: 0;
  background: var(--bg2); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; padding: 1.5rem 1rem;
  position: sticky; top: var(--nav-h); height: calc(100vh - var(--nav-h)); overflow-y: auto;
}
.builder-logo { display: flex; align-items: center; gap: .5rem; font-size: 1.1rem; font-weight: 800; margin-bottom: 2rem; }
.steps-nav { display: flex; flex-direction: column; gap: .25rem; flex: 1; }
.step-nav-item {
  display: flex; align-items: center; gap: .75rem;
  padding: .65rem .85rem; border-radius: 10px;
  font-size: .88rem; font-weight: 500; color: var(--text2);
  cursor: pointer; transition: all var(--transition);
  border: 1px solid transparent;
}
.step-nav-item:hover { background: var(--bg3); color: var(--text); }
.step-nav-item.active { background: rgba(59,130,246,.12); color: var(--accent); border-color: rgba(59,130,246,.2); font-weight: 600; }
.step-nav-item.done { color: var(--accent4); }
.step-nav-num {
  width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid currentColor;
  font-size: .72rem; font-weight: 700; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: all var(--transition);
}
.step-nav-item.active .step-nav-num { background: var(--accent); border-color: var(--accent); color: #fff; }
.step-nav-item.done .step-nav-num { background: var(--accent4); border-color: var(--accent4); color: #fff; }
.aside-footer { padding-top: 1rem; border-top: 1px solid var(--border); margin-top: 1rem; }
.builder-content-area { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.builder-progress-wrap { height: 3px; background: var(--bg3); flex-shrink: 0; }
.builder-progress-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent2)); transition: width .4s ease; border-radius: 0 99px 99px 0; }
.step-nav-header { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.5rem; border-bottom: 1px solid var(--border); flex-shrink: 0; background: var(--bg); }
.step-counter { font-size: .85rem; color: var(--text3); font-weight: 500; font-family: var(--font-mono); }
.form-steps-container { flex: 1; overflow-y: auto; padding: 2rem 1.5rem; }
.form-step { display: none; animation: fade-up .3s ease; }
.form-step.active { display: block; }
.step-heading { margin-bottom: 2rem; }
.step-heading h2 { font-size: 1.6rem; font-weight: 800; margin-bottom: .3rem; }
.step-heading p { color: var(--text2); font-size: .9rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.form-grid.three { grid-template-columns: 1fr 1fr 1fr; }
.form-group { display: flex; flex-direction: column; gap: .4rem; }
.form-group.full { grid-column: 1 / -1; }
.form-label { font-size: .83rem; font-weight: 600; color: var(--text2); letter-spacing: .02em; }
.form-label .optional { font-weight: 400; color: var(--text3); }
/* Dynamic list entries */
.dynamic-entry {
  background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.25rem; margin-bottom: 1rem; position: relative; transition: border-color var(--transition);
}
.dynamic-entry:hover { border-color: var(--text3); }
.dynamic-entry-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.dynamic-entry-title { font-size: .9rem; font-weight: 700; color: var(--text); }
.btn-remove { background: rgba(239,68,68,.1); border: 1px solid rgba(239,68,68,.2); color: var(--danger); border-radius: 8px; padding: .3rem .6rem; font-size: .8rem; transition: all var(--transition); }
.btn-remove:hover { background: rgba(239,68,68,.2); }
.btn-add-entry {
  display: flex; align-items: center; gap: .5rem;
  border: 1.5px dashed var(--border); border-radius: var(--radius);
  padding: .85rem 1rem; background: transparent; color: var(--accent);
  font-size: .88rem; font-weight: 600; width: 100%; justify-content: center;
  transition: all var(--transition); margin-top: .5rem;
}
.btn-add-entry:hover { border-color: var(--accent); background: rgba(59,130,246,.05); }

/* Photo Upload Component */
.photo-upload-card {
  background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.25rem; margin-bottom: 1.5rem; transition: all var(--transition);
}
.photo-upload-card:hover { border-color: rgba(59,130,246,.3); }
.photo-dropzone {
  border: 2px dashed var(--border); border-radius: 12px;
  padding: 1.75rem 1.25rem; text-align: center; cursor: pointer;
  background: rgba(255,255,255,.02); transition: all var(--transition);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem;
}
.photo-dropzone:hover, .photo-dropzone.dragover {
  border-color: var(--accent); background: rgba(59,130,246,.06);
}
.photo-dropzone-icon {
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(59,130,246,.12); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; margin-bottom: .25rem;
}
.photo-dropzone-title { font-size: .95rem; font-weight: 700; color: var(--text); }
.photo-dropzone-sub { font-size: .8rem; color: var(--text3); }
.photo-preview-layout {
  display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap;
}
.photo-avatar-ring {
  width: 80px; height: 80px; border-radius: 50%;
  padding: 3px; background: linear-gradient(135deg, var(--accent), var(--accent2));
  flex-shrink: 0; box-shadow: 0 4px 12px rgba(0,0,0,.25);
}
.photo-avatar-img {
  width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block;
}
.photo-details-block { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: .4rem; }
.photo-details-title { font-size: .95rem; font-weight: 700; color: var(--text); }
.photo-details-actions { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.photo-toggle-row {
  margin-top: .75rem; padding-top: .75rem; border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: .6rem; font-size: .85rem; color: var(--text2);
}
.photo-toggle-row input[type="checkbox"] {
  width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer;
}
/* Skills input */
.skills-container { display: flex; flex-direction: column; gap: 1.25rem; }
.skill-category { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; }
.skill-category-title { font-size: .9rem; font-weight: 700; margin-bottom: .75rem; display: flex; align-items: center; gap: .5rem; }
.tags-display { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .75rem; min-height: 28px; }
.skill-tag {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .3rem .75rem; border-radius: 99px; font-size: .8rem; font-weight: 600;
  cursor: default; transition: all var(--transition);
}
.skill-tag.technical { background: rgba(59,130,246,.12); color: var(--accent); border: 1px solid rgba(59,130,246,.2); }
.skill-tag.soft { background: rgba(139,92,246,.12); color: var(--accent3); border: 1px solid rgba(139,92,246,.2); }
.skill-tag.tools { background: rgba(6,182,212,.12); color: var(--accent2); border: 1px solid rgba(6,182,212,.2); }
.skill-tag.languages { background: rgba(16,185,129,.12); color: var(--accent4); border: 1px solid rgba(16,185,129,.2); }
.skill-tag-remove { cursor: pointer; opacity: .7; }
.skill-tag-remove:hover { opacity: 1; }
.tag-input-row { display: flex; gap: .5rem; }
.tag-input-row input { flex: 1; padding: .55rem .85rem; font-size: .85rem; }
.tag-input-row .btn { padding: .55rem 1rem; font-size: .82rem; flex-shrink: 0; }
/* Template selector in builder */
.template-selector { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.tpl-option {
  border: 2px solid var(--border); border-radius: var(--radius); padding: 1rem;
  cursor: pointer; text-align: center; transition: all var(--transition); background: var(--bg3);
}
.tpl-option:hover { border-color: var(--accent); }
.tpl-option.selected { border-color: var(--accent); background: rgba(59,130,246,.08); }
.tpl-option .tpl-name { font-weight: 700; font-size: .95rem; display: flex; align-items: center; justify-content: center; gap: .4rem; }
.tpl-option .tpl-desc { font-size: .78rem; color: var(--text3); margin-top: .2rem; }
.tpl-color-swatch { width: 40px; height: 40px; border-radius: 10px; margin: 0 auto .6rem; }

/* =========================================================
   PREVIEW
========================================================= */
#view-preview { padding-top: var(--nav-h); }
.preview-wrap { display: flex; flex: 1; min-height: calc(100vh - var(--nav-h)); }
.preview-aside {
  width: 280px; flex-shrink: 0;
  background: var(--bg2); border-right: 1px solid var(--border);
  padding: 1.5rem 1.25rem; overflow-y: auto; display: flex; flex-direction: column; gap: 1.5rem;
  position: sticky; top: var(--nav-h); height: calc(100vh - var(--nav-h));
}
.aside-heading { font-size: 1rem; font-weight: 700; display: flex; align-items: center; gap: .5rem; color: var(--text); }
.aside-group { display: flex; flex-direction: column; gap: .75rem; }
.group-title { font-size: .8rem; font-weight: 600; color: var(--text3); letter-spacing: .06em; text-transform: uppercase; display: flex; align-items: center; gap: .4rem; }
.tpl-selector { display: flex; flex-direction: column; gap: .5rem; }
.tpl-sel-btn {
  display: flex; align-items: center; gap: .75rem;
  padding: .6rem .85rem; border-radius: 10px; background: var(--bg3);
  border: 1.5px solid var(--border); transition: all var(--transition);
  text-align: left; cursor: pointer; color: var(--text);
}
.tpl-sel-btn:hover { border-color: var(--text3); }
.tpl-sel-btn.active { border-color: var(--accent); background: rgba(59,130,246,.08); }
.tpl-color-dot { width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0; }
.tpl-sel-btn strong { display: block; font-size: .88rem; font-weight: 700; }
.tpl-sel-btn small { font-size: .75rem; color: var(--text3); }
.quick-actions { display: flex; flex-direction: column; gap: .5rem; }
.qa-btn {
  display: flex; align-items: center; gap: .75rem; padding: .7rem 1rem;
  border-radius: 10px; border: 1.5px solid var(--border); background: var(--bg3);
  color: var(--text); font-size: .88rem; font-weight: 600; transition: all var(--transition); cursor: pointer;
}
.qa-btn:hover { border-color: var(--text3); background: var(--bg4); }
.qa-btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 4px 12px rgba(59,130,246,.3); }
.qa-btn.primary:hover { background: #2563EB; }
.qa-btn.ai { border-color: rgba(139,92,246,.3); background: rgba(139,92,246,.08); color: var(--accent3); }
.qa-btn.ai:hover { background: rgba(139,92,246,.15); }
.qa-btn i { width: 16px; text-align: center; }
.aside-tip { background: rgba(245,158,11,.07); border: 1px solid rgba(245,158,11,.15); border-radius: 10px; padding: .75rem; display: flex; gap: .6rem; font-size: .8rem; color: var(--text2); margin-top: auto; }
.aside-tip i { color: var(--warning); flex-shrink: 0; margin-top: 1px; }
.preview-main-area { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.preview-topbar { display: flex; align-items: center; justify-content: space-between; padding: .85rem 1.5rem; border-bottom: 1px solid var(--border); background: var(--bg); flex-shrink: 0; }
.preview-topbar-left { display: flex; align-items: center; gap: .75rem; font-size: .9rem; font-weight: 600; color: var(--text2); flex-wrap: wrap; }
.preview-live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent4); box-shadow: 0 0 8px var(--accent4); animation: pulse 2s ease infinite; }
.a4-page-badge {
  display: inline-flex; align-items: center; gap: .4rem;
  background: rgba(59,130,246,.1); border: 1px solid rgba(59,130,246,.25);
  color: var(--accent); padding: .25rem .65rem; border-radius: 99px;
  font-size: .74rem; font-weight: 700; letter-spacing: .03em;
}
.preview-topbar-right { display: flex; gap: .75rem; align-items: center; }
.resume-preview-scroll {
  flex: 1; overflow-y: auto; background: #94a3b8; padding: 2.5rem 1.5rem;
  display: flex; justify-content: center; align-items: flex-start;
}
[data-theme="dark"] .resume-preview-scroll { background: #0f172a; }

/* Strict International Standard A4 Dimensions (210mm x 297mm / 794px x 1123px at 96 DPI) */
.resume-paper-wrap {
  background: #fff;
  box-shadow: 0 10px 40px rgba(0,0,0,.35), 0 1px 3px rgba(0,0,0,.15);
  width: 794px;
  max-width: 100%;
  min-height: 1123px;
  border-radius: 2px;
  position: relative;
  box-sizing: border-box;
  overflow: hidden;
  margin: 0 auto;
}

.resume-a4-page {
  width: 794px;
  max-width: 100%;
  min-height: 1123px;
  box-sizing: border-box;
  background: #ffffff;
  position: relative;
}

/* Print Rules for True 1:1 Vector A4 Output (Real Text Format / ATS Compliant) */
@page {
  size: A4 portrait;
  margin: 0mm;
}

@media print {
  *, *::before, *::after {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
  }
  html, body {
    margin: 0 !important;
    padding: 0 !important;
    width: 210mm !important;
    height: auto !important;
    min-height: 297mm !important;
    background: #ffffff !important;
    overflow: visible !important;
  }
  #navbar, #view-landing, #view-builder, #view-portfolio,
  .preview-aside, .preview-topbar, #toast-container,
  #custom-scroll-to-top-btn, #cookie-banner, .modal-overlay,
  .ad-slot-wrapper, .ad-sidebar-slot, .site-footer,
  #recruiter-action-banner, .viral-promo-card {
    display: none !important;
  }
  #view-preview {
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #ffffff !important;
    position: static !important;
  }
  .preview-wrap, .preview-main-area, .resume-preview-scroll {
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    overflow: visible !important;
    position: static !important;
    width: 210mm !important;
  }
  .resume-paper-wrap {
    box-shadow: none !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 210mm !important;
    max-width: 210mm !important;
    min-height: 297mm !important;
    page-break-inside: avoid;
    page-break-after: auto;
  }
  .resume-a4-page {
    width: 210mm !important;
    max-width: 210mm !important;
    min-height: 297mm !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    page-break-inside: avoid;
  }
}


/* =========================================================
   PORTFOLIO & SHARING
========================================================= */
#view-portfolio { display: none; background: #050810; min-height: 100vh; }
#view-portfolio.active { display: block; }
.portfolio-nav {
  position: sticky; top: 0; z-index: 100; display: flex; align-items: center;
  justify-content: space-between; gap: 1rem; padding: 0 1.5rem; height: 64px;
  background: rgba(5,8,16,.92); backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.pf-nav-brand-wrap { display: flex; align-items: center; gap: .75rem; }
.pf-nav-brand { font-size: 1.15rem; font-weight: 800; color: #fff; letter-spacing: -.01em; }
.pf-badge-live {
  display: inline-flex; align-items: center; gap: .35rem; font-size: .7rem; font-weight: 700;
  color: #10B981; background: rgba(16,185,129,.12); border: 1px solid rgba(16,185,129,.25);
  padding: .2rem .55rem; border-radius: 99px; text-transform: uppercase; letter-spacing: .06em;
}
.pf-badge-live i { font-size: .45rem; animation: pulse-live 2s infinite ease-in-out; }
@keyframes pulse-live { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.4;transform:scale(1.2)} }
.pf-nav-links { display: flex; gap: 1.5rem; }
.pf-nav-links a { color: rgba(255,255,255,.65); font-size: .88rem; font-weight: 500; transition: color var(--transition); }
.pf-nav-links a:hover { color: #fff; }
.pf-nav-actions { display: flex; align-items: center; gap: .6rem; }
.btn-share-pf {
  background: linear-gradient(135deg, #8B5CF6, #06B6D4); color: #fff !important;
  border: none; font-weight: 600; box-shadow: 0 4px 14px rgba(139,92,246,.3);
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn-share-pf:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(139,92,246,.45); }

/* Shared Portfolio Recruiter / Visitor Top Banner */
.pf-shared-banner {
  background: linear-gradient(90deg, #0f172a, #1e1b4b, #0f172a);
  border-bottom: 1px solid rgba(139,92,246,.3);
  padding: .75rem 1.5rem; display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; z-index: 101; position: relative;
}
.pf-shared-badge {
  display: flex; align-items: center; gap: .6rem; font-size: .88rem; color: #e2e8f0;
}
.pf-shared-badge strong { color: #fff; font-weight: 700; }
.pf-pulse-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #06B6D4;
  box-shadow: 0 0 10px #06B6D4; animation: pulse-live 1.8s infinite;
}
.pf-shared-actions { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.btn-accept {
  background: linear-gradient(135deg, #10B981, #059669); color: #fff !important;
  border: none; font-weight: 700; box-shadow: 0 4px 12px rgba(16,185,129,.35);
}
.btn-accept:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(16,185,129,.45); }
.btn-promo {
  background: linear-gradient(135deg, #8B5CF6, #6366F1); color: #fff !important;
  border: none; font-weight: 700;
}
.btn-outline-white {
  background: rgba(255,255,255,.08); color: #fff !important;
  border: 1px solid rgba(255,255,255,.2); font-weight: 600;
}
.btn-outline-white:hover { background: rgba(255,255,255,.16); }

/* Floating Viral Promo Card */
.pf-floating-promo {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 120;
  max-width: 380px; width: calc(100% - 3rem);
  background: rgba(15,23,42,.95); backdrop-filter: blur(16px);
  border: 1px solid rgba(139,92,246,.4); border-radius: 16px;
  padding: 1.15rem 1.25rem; box-shadow: 0 20px 40px rgba(0,0,0,.6);
  animation: slide-up .4s ease forwards;
}
.pf-floating-promo-inner { display: flex; flex-direction: column; gap: .65rem; }
.pf-floating-promo-header {
  display: flex; align-items: center; justify-content: space-between; font-size: .78rem;
  font-weight: 700; color: #a78bfa; text-transform: uppercase; letter-spacing: .06em;
}
.pf-floating-promo-close {
  background: none; border: none; color: rgba(255,255,255,.5); cursor: pointer;
  font-size: .85rem; padding: 0 .2rem;
}
.pf-floating-promo-close:hover { color: #fff; }
.pf-floating-promo p {
  color: #e2e8f0; font-size: .88rem; line-height: 1.45; margin: 0;
}
.pf-floating-promo-cta {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  background: linear-gradient(135deg, #8B5CF6, #06B6D4); color: #fff;
  border: none; border-radius: 8px; padding: .55rem 1rem; font-size: .85rem;
  font-weight: 700; cursor: pointer; text-decoration: none; transition: all .15s ease;
}
.pf-floating-promo-cta:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(139,92,246,.4); }

/* =========================================================
   PORTFOLIO SHARE MODAL STYLING
========================================================= */
.share-modal-box { max-width: 620px; }
.share-modal-body { display: flex; flex-direction: column; gap: 1.25rem; padding: 1.5rem; }
.share-icon { background: rgba(139,92,246,.15); border-color: rgba(139,92,246,.3); color: #8B5CF6; }

.share-url-container { display: flex; flex-direction: column; gap: .4rem; }
.share-field-label { display: flex; flex-direction: column; gap: .15rem; font-size: .88rem; font-weight: 700; color: var(--text); }
.share-field-sub { font-size: .75rem; font-weight: 400; color: var(--text3); }
.share-url-input-wrap {
  display: flex; gap: .5rem; background: var(--bg3); border: 1.5px solid var(--border);
  border-radius: 10px; padding: .35rem .45rem; transition: border-color .2s;
}
.share-url-input-wrap:focus-within { border-color: var(--accent); }
.share-url-input {
  flex: 1; background: transparent; border: none; color: var(--text); font-family: var(--font-mono);
  font-size: .85rem; padding: .4rem .6rem; outline: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.btn-copy { white-space: nowrap; padding: .45rem 1.1rem; font-size: .85rem; font-weight: 700; }

.share-slug-container {
  display: flex; flex-direction: column; gap: .35rem; background: var(--bg);
  border: 1px solid var(--border); border-radius: 10px; padding: .85rem 1rem;
}
.slug-input-group {
  display: flex; align-items: center; background: var(--bg3); border: 1px solid var(--border);
  border-radius: 8px; overflow: hidden; margin-top: .25rem;
}
.slug-prefix {
  padding: .5rem .75rem; font-size: .8rem; font-family: var(--font-mono);
  color: var(--text3); background: var(--bg2); border-right: 1px solid var(--border); user-select: none;
}
.slug-input {
  flex: 1; background: transparent; border: none; padding: .5rem .75rem; color: var(--text);
  font-size: .85rem; outline: none; font-weight: 600;
}

.share-social-section { display: flex; flex-direction: column; gap: .6rem; }
.share-section-title { font-size: .8rem; font-weight: 700; color: var(--text3); text-transform: uppercase; letter-spacing: .06em; display: flex; align-items: center; gap: .4rem; }
.social-share-buttons {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: .6rem;
}
.social-btn {
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .65rem .85rem; border-radius: 10px; border: 1px solid transparent;
  font-size: .82rem; font-weight: 600; cursor: pointer; transition: all .15s ease; color: #fff;
}
.social-btn:hover { transform: translateY(-1px); opacity: .95; }
.social-btn.linkedin { background: #0A66C2; }
.social-btn.whatsapp { background: #25D366; }
.social-btn.twitter { background: #111827; border-color: rgba(255,255,255,.15); }
.social-btn.email { background: #475569; }
.social-btn.native { background: linear-gradient(135deg,#8B5CF6,#3B82F6); }

.share-bottom-grid {
  display: grid; grid-template-columns: 160px 1fr; gap: 1rem; align-items: stretch;
}
@media (max-width: 540px) {
  .share-bottom-grid { grid-template-columns: 1fr; }
  .portfolio-nav .pf-nav-links { display: none; }
}
.share-qr-card {
  background: var(--bg3); border: 1px solid var(--border); border-radius: 12px;
  padding: .85rem; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; text-align: center;
}
.share-qr-header { font-size: .75rem; font-weight: 700; color: var(--text2); display: flex; align-items: center; gap: .35rem; }
.qr-canvas-wrap {
  background: #FFFFFF; padding: 6px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.qr-download-btn { font-size: .75rem; padding: .25rem .6rem; color: var(--accent); }

.share-benefits-card {
  background: var(--bg); border: 1px solid var(--border); border-radius: 12px;
  padding: .85rem 1rem; display: flex; flex-direction: column; justify-content: center;
}
.share-benefits-card h4 { font-size: .82rem; font-weight: 700; color: var(--text); margin-bottom: .4rem; display: flex; align-items: center; gap: .4rem; }
.share-benefits-card ul { margin: 0; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: .4rem; }
.share-benefits-card li { font-size: .78rem; color: var(--text2); line-height: 1.4; display: flex; align-items: flex-start; gap: .45rem; }
.share-benefits-card li i { font-size: .8rem; margin-top: 2px; flex-shrink: 0; }

/* =========================================================
   PDF EXPORT MODAL STYLING (Vector Text vs High-Res Download)
========================================================= */
.export-modal-box { max-width: 680px; }
.export-modal-body { display: flex; flex-direction: column; gap: 1.25rem; padding: 1.5rem; }
.export-intro {
  background: var(--bg3); border: 1px solid var(--border); border-radius: 12px;
  padding: .9rem 1.1rem; display: flex; align-items: center; gap: .85rem;
}
.export-intro-icon {
  width: 36px; height: 36px; border-radius: 10px; background: rgba(59,130,246,.15);
  color: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0;
}
.export-intro-text { font-size: .82rem; color: var(--text2); line-height: 1.5; }
.export-intro-text strong { color: var(--text); }

.export-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem;
}
@media (max-width: 640px) {
  .export-grid { grid-template-columns: 1fr; }
}

.export-card {
  background: var(--bg); border: 2px solid var(--border); border-radius: 14px;
  padding: 1.25rem; display: flex; flex-direction: column; justify-content: space-between;
  position: relative; transition: all .2s ease;
}
.export-card:hover {
  transform: translateY(-2px); box-shadow: var(--shadow-md);
}
.export-card.featured {
  border-color: #3B82F6; background: linear-gradient(180deg, rgba(59,130,246,.04) 0%, var(--bg) 100%);
  box-shadow: 0 4px 20px rgba(59,130,246,.12);
}
.export-card-badge {
  position: absolute; top: -10px; right: 14px;
  background: linear-gradient(135deg, #3B82F6, #1D4ED8); color: #fff;
  font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em;
  padding: .2rem .65rem; border-radius: 99px; box-shadow: 0 2px 8px rgba(59,130,246,.35);
}
.export-card-badge.alt {
  background: linear-gradient(135deg, #10B981, #059669);
  box-shadow: 0 2px 8px rgba(16,185,129,.35);
}

.export-card-header {
  display: flex; align-items: flex-start; gap: .75rem; margin-bottom: .85rem;
}
.export-type-icon {
  width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; flex-shrink: 0;
}
.export-type-icon.vector { background: rgba(59,130,246,.15); color: #3B82F6; }
.export-type-icon.file { background: rgba(16,185,129,.15); color: #10B981; }

.export-card-title { font-size: 1rem; font-weight: 800; color: var(--text); margin-bottom: .2rem; }
.export-card-sub { font-size: .75rem; color: var(--text3); }

.export-card-desc {
  font-size: .82rem; color: var(--text2); line-height: 1.5; margin-bottom: 1rem;
}

.export-features {
  margin: 0 0 1.25rem 0; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: .45rem;
}
.export-features li {
  font-size: .76rem; color: var(--text2); display: flex; align-items: center; gap: .45rem;
}
.export-features li i { font-size: .78rem; }
.export-features li i.fa-check-circle { color: #10B981; }

.export-action-btn {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .75rem 1rem; border-radius: 10px; font-size: .88rem; font-weight: 700;
  cursor: pointer; transition: all .15s ease; border: none;
}
.export-action-btn.primary {
  background: linear-gradient(135deg, #3B82F6, #2563EB); color: #fff;
  box-shadow: 0 4px 14px rgba(37,99,235,.3);
}
.export-action-btn.primary:hover {
  transform: translateY(-1px); box-shadow: 0 6px 18px rgba(37,99,235,.45);
}
.export-action-btn.secondary {
  background: var(--bg3); color: var(--text); border: 1.5px solid var(--border);
}
.export-action-btn.secondary:hover {
  background: var(--bg2); border-color: var(--text3);
}

.export-tips-box {
  background: rgba(245,158,11,.08); border: 1px solid rgba(245,158,11,.25); border-radius: 10px;
  padding: .75rem 1rem; display: flex; align-items: flex-start; gap: .65rem;
}
.export-tips-box i { color: #D97706; font-size: .95rem; margin-top: 2px; flex-shrink: 0; }
.export-tips-box p { margin: 0; font-size: .76rem; color: var(--text2); line-height: 1.45; }
.export-tips-box p strong { color: var(--text); }

/* =========================================================
   MODAL
========================================================= */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.7); backdrop-filter: blur(6px);
  z-index: 2000; display: none; align-items: center; justify-content: center; padding: 1rem;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: var(--bg2); border: 1px solid var(--card-border); border-radius: var(--radius-lg);
  max-width: 680px; width: 100%; max-height: 85vh; overflow: hidden; display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg); animation: modal-in .25s ease;
}
.modal-box.small { max-width: 420px; }
@keyframes modal-in { from{opacity:0;transform:scale(.95) translateY(8px)} to{opacity:1;transform:none} }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; padding: 1.5rem; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.modal-header-left { display: flex; align-items: flex-start; gap: 1rem; }
.modal-icon { width: 44px; height: 44px; border-radius: 12px; background: rgba(59,130,246,.1); border: 1px solid rgba(59,130,246,.2); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; color: var(--accent); flex-shrink: 0; }
.modal-icon.danger { background: rgba(239,68,68,.1); border-color: rgba(239,68,68,.2); color: var(--danger); }
.modal-header h2 { font-size: 1.05rem; font-weight: 700; margin-bottom: .1rem; }
.modal-header p { font-size: .82rem; color: var(--text3); }
.modal-close-btn { background: none; color: var(--text3); font-size: 1.1rem; padding: .25rem; border-radius: 6px; transition: color var(--transition); }
.modal-close-btn:hover { color: var(--text); }
.modal-body { padding: 1.5rem; overflow-y: auto; flex: 1; }
/* AI Suggestion cards */
.ai-category { margin-bottom: 1.5rem; }
.ai-category-title { font-size: .82rem; font-weight: 700; color: var(--text3); letter-spacing: .06em; text-transform: uppercase; margin-bottom: .75rem; display: flex; align-items: center; gap: .4rem; }
.ai-suggestion {
  background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius);
  padding: .85rem 1rem; margin-bottom: .5rem; cursor: pointer; transition: all var(--transition);
  display: flex; align-items: flex-start; gap: .75rem;
}
.ai-suggestion:hover { border-color: var(--accent); background: rgba(59,130,246,.05); }
.ai-suggestion-icon { font-size: .9rem; color: var(--accent); flex-shrink: 0; margin-top: 2px; }
.ai-suggestion-text { font-size: .88rem; color: var(--text); line-height: 1.5; }
.ai-suggestion-action { margin-left: auto; font-size: .75rem; color: var(--accent); font-weight: 600; flex-shrink: 0; background: rgba(59,130,246,.1); padding: .25rem .5rem; border-radius: 6px; }

/* =========================================================
   ADSENSE AD CONTAINERS & COOKIE BANNER
========================================================= */
.ad-slot-wrapper {
  margin: 2.5rem auto; max-width: 970px; padding: 0 1rem;
}
.ad-card {
  background: var(--bg2); border: 1px dashed var(--border); border-radius: 12px;
  padding: 1.25rem 1rem; text-align: center; display: flex; flex-direction: column;
  align-items: center; justify-content: center; min-height: 100px; position: relative;
  transition: border-color var(--transition);
}
.ad-card:hover { border-color: rgba(59,130,246,.3); }
.ad-badge {
  font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text3); margin-bottom: .4rem; display: inline-flex; align-items: center; gap: .35rem;
}
.ad-placeholder-content {
  font-size: .85rem; color: var(--text3); font-family: var(--font-mono);
}
.ad-sidebar-slot {
  margin-top: 1rem; border-top: 1px solid var(--border); padding-top: 1rem;
}
.ad-sidebar-card {
  background: var(--bg3); border: 1px dashed var(--border); border-radius: 8px;
  padding: 1rem .75rem; text-align: center; min-height: 120px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}

/* Cookie Consent Banner */
.cookie-banner {
  position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%);
  width: calc(100% - 2rem); max-width: 720px; z-index: 2500;
  background: rgba(15,23,42,.92); backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,.12); border-radius: 16px;
  padding: 1.25rem 1.5rem; box-shadow: 0 20px 40px rgba(0,0,0,.4);
  display: none; animation: slide-up .35s ease forwards;
}
[data-theme="light"] .cookie-banner {
  background: rgba(255,255,255,.94); border-color: rgba(0,0,0,.1);
  box-shadow: 0 20px 40px rgba(0,0,0,.15);
}
.cookie-banner.show { display: block; }
@keyframes slide-up { from { opacity: 0; transform: translate(-50%, 20px); } to { opacity: 1; transform: translate(-50%, 0); } }
.cookie-banner-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap;
}
.cookie-banner-content { flex: 1; min-width: 280px; }
.cookie-banner-title {
  font-size: .95rem; font-weight: 700; color: #fff; margin-bottom: .25rem;
  display: flex; align-items: center; gap: .5rem;
}
[data-theme="light"] .cookie-banner-title { color: #0f172a; }
.cookie-banner-text {
  font-size: .83rem; color: #94a3b8; line-height: 1.5; margin: 0;
}
[data-theme="light"] .cookie-banner-text { color: #64748b; }
.cookie-banner-text a { color: var(--accent); text-decoration: underline; }
.cookie-banner-actions {
  display: flex; align-items: center; gap: .75rem; flex-shrink: 0;
}
.cookie-banner-actions .btn { font-size: .82rem; padding: .55rem 1rem; }

/* =========================================================
   BLOGS & ARTICLES SYSTEM (SEO & ADSENSE RICH CONTENT)
========================================================= */
.blog-header-section {
  background: var(--bg2); border-bottom: 1px solid var(--border);
  padding: 4rem 0 3rem; text-align: center;
}
.blog-search-bar {
  max-width: 540px; margin: 1.75rem auto 1.5rem; position: relative;
}
.blog-search-input {
  width: 100%; padding: .85rem 1.25rem .85rem 3rem;
  background: var(--bg); border: 1px solid var(--border); border-radius: 99px;
  color: var(--text); font-size: .95rem; font-family: var(--font-sans);
  transition: all var(--transition);
}
.blog-search-input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(59,130,246,.15); }
.blog-search-icon {
  position: absolute; left: 1.25rem; top: 50%; transform: translateY(-50%);
  color: var(--text3); font-size: .95rem;
}
.blog-categories {
  display: flex; align-items: center; justify-content: center; gap: .5rem; flex-wrap: wrap; margin-top: 1rem;
}
.blog-cat-btn {
  background: var(--bg); border: 1px solid var(--border); border-radius: 99px;
  padding: .45rem 1rem; font-size: .82rem; font-weight: 600; color: var(--text2);
  cursor: pointer; transition: all var(--transition);
}
.blog-cat-btn:hover { color: var(--text); border-color: var(--border-hover); }
.blog-cat-btn.active {
  background: var(--accent); color: #fff; border-color: var(--accent);
}

.blog-container { max-width: 1200px; margin: 0 auto; padding: 3rem 1.5rem 5rem; }

/* Featured Blog Post */
.featured-post-card {
  background: var(--bg2); border: 1px solid var(--border); border-radius: 20px;
  overflow: hidden; display: grid; grid-template-columns: 1.1fr 1fr; margin-bottom: 3.5rem;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  cursor: pointer;
}
.featured-post-card:hover {
  border-color: rgba(59,130,246,.4); transform: translateY(-3px); box-shadow: var(--shadow-lg);
}
.featured-post-cover {
  background: linear-gradient(135deg, #1E3A8A 0%, #3B82F6 50%, #8B5CF6 100%);
  padding: 3rem 2.5rem; display: flex; flex-direction: column; justify-content: space-between;
  color: #fff; position: relative; overflow: hidden;
}
.featured-post-cover::after {
  content: ''; position: absolute; top: -50%; right: -50%; width: 200%; height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,.15) 0%, transparent 60%); pointer-events: none;
}
.featured-badge {
  background: rgba(255,255,255,.2); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.3); border-radius: 99px;
  padding: .35rem .85rem; font-size: .75rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; width: fit-content; color: #fff;
}
.featured-cover-icon { font-size: 3.5rem; color: rgba(255,255,255,.9); margin: 2rem 0; }
.featured-post-body {
  padding: 2.5rem; display: flex; flex-direction: column; justify-content: space-between;
}
.post-meta {
  display: flex; align-items: center; gap: .85rem; font-size: .82rem; color: var(--text3); margin-bottom: .85rem;
}
.post-meta span { display: flex; align-items: center; gap: .35rem; }
.post-category-tag {
  font-weight: 700; text-transform: uppercase; font-size: .72rem; letter-spacing: .06em;
  padding: .25rem .6rem; border-radius: 6px;
}
.post-category-tag.ats { background: rgba(59,130,246,.12); color: var(--accent); }
.post-category-tag.guide { background: rgba(139,92,246,.12); color: var(--accent2); }
.post-category-tag.interview { background: rgba(16,185,129,.12); color: var(--accent4); }
.post-category-tag.portfolio { background: rgba(6,182,212,.12); color: var(--accent3); }

.featured-post-body h2 {
  font-size: 1.5rem; font-weight: 800; color: var(--text); line-height: 1.35; margin-bottom: 1rem;
}
.featured-post-body p {
  color: var(--text2); font-size: .95rem; line-height: 1.65; margin-bottom: 1.5rem;
}
.post-author {
  display: flex; align-items: center; justify-content: space-between;
  border-top: 1px solid var(--border); padding-top: 1.25rem; margin-top: auto;
}
.author-info { display: flex; align-items: center; gap: .75rem; }
.author-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--accent); color: #fff; font-weight: 700; font-size: .85rem;
  display: flex; align-items: center; justify-content: center;
}
.author-name { font-size: .88rem; font-weight: 700; color: var(--text); }
.author-role { font-size: .75rem; color: var(--text3); }
.read-more-link {
  font-size: .88rem; font-weight: 700; color: var(--accent); display: flex; align-items: center; gap: .4rem;
}

/* Blog Posts Grid */
.blog-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem;
}
.blog-card {
  background: var(--bg); border: 1px solid var(--border); border-radius: 16px;
  overflow: hidden; display: flex; flex-direction: column;
  transition: all var(--transition); cursor: pointer;
}
.blog-card:hover {
  border-color: rgba(59,130,246,.4); transform: translateY(-3px); box-shadow: var(--shadow-md);
}
.blog-card-header {
  height: 140px; background: linear-gradient(135deg, var(--bg2) 0%, var(--bg3) 100%);
  border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: center;
  position: relative;
}
.blog-card-header i { font-size: 2.5rem; color: var(--accent); opacity: .85; }
.blog-card-body {
  padding: 1.5rem; display: flex; flex-direction: column; flex: 1;
}
.blog-card-body h3 {
  font-size: 1.15rem; font-weight: 700; color: var(--text); line-height: 1.4; margin: .5rem 0 .75rem;
}
.blog-card-body p {
  font-size: .88rem; color: var(--text2); line-height: 1.6; margin-bottom: 1.25rem; flex: 1;
}
.blog-card-footer {
  border-top: 1px solid var(--border); padding-top: 1rem; margin-top: auto;
  display: flex; align-items: center; justify-content: space-between; font-size: .8rem; color: var(--text3);
}

/* Modal Article Full Reader */
.article-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.7); backdrop-filter: blur(8px);
  z-index: 2000; display: none; align-items: center; justify-content: center; padding: 1.5rem;
}
.article-modal-overlay.open { display: flex; }
.article-modal-container {
  background: var(--bg); border: 1px solid var(--border); border-radius: 20px;
  width: 100%; max-width: 860px; max-height: 90vh; display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg); overflow: hidden; animation: modal-in .25s ease;
}
.article-modal-top {
  padding: 1.25rem 2rem; border-bottom: 1px solid var(--border); background: var(--bg2);
  display: flex; align-items: center; justify-content: space-between; flex-shrink: 0;
}
.article-modal-scroll {
  padding: 2.5rem; overflow-y: auto; flex: 1;
}
.article-content { max-width: 720px; margin: 0 auto; color: var(--text); }
.article-content h1 { font-size: 2rem; font-weight: 900; line-height: 1.3; margin-bottom: 1rem; }
.article-content h2 { font-size: 1.4rem; font-weight: 800; margin: 2rem 0 .75rem; color: var(--text); border-bottom: 1px solid var(--border); padding-bottom: .5rem; }
.article-content h3 { font-size: 1.15rem; font-weight: 700; margin: 1.5rem 0 .5rem; color: var(--text); }
.article-content p { font-size: 1.05rem; line-height: 1.75; color: var(--text2); margin-bottom: 1.25rem; }
.article-content ul, .article-content ol { padding-left: 1.5rem; margin-bottom: 1.5rem; color: var(--text2); font-size: 1rem; line-height: 1.7; }
.article-content li { margin-bottom: .5rem; }
.article-callout {
  background: var(--bg2); border-left: 4px solid var(--accent); border-radius: 0 12px 12px 0;
  padding: 1.25rem 1.5rem; margin: 1.75rem 0; font-style: italic; color: var(--text);
}
.article-author-box {
  margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: 1.25rem; background: var(--bg2);
  padding: 1.5rem; border-radius: 16px; border: 1px solid var(--border);
}

@media (max-width: 1024px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
  .featured-post-card { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .blog-grid { grid-template-columns: 1fr; }
  .article-modal-scroll { padding: 1.5rem; }
  .article-content h1 { font-size: 1.5rem; }
}
#toast-container { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 3000; display: flex; flex-direction: column; gap: .5rem; }
.toast {
  display: flex; align-items: center; gap: .75rem;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 12px; padding: .85rem 1.1rem; min-width: 260px; max-width: 380px;
  box-shadow: var(--shadow); font-size: .88rem; font-weight: 500;
  animation: toast-in .3s ease; transition: all .3s ease;
}
.toast.success { border-color: rgba(16,185,129,.25); }
.toast.error { border-color: rgba(239,68,68,.25); }
.toast.info { border-color: rgba(59,130,246,.25); }
.toast-icon { font-size: 1rem; flex-shrink: 0; }
.toast.success .toast-icon { color: var(--accent4); }
.toast.error .toast-icon { color: var(--danger); }
.toast.info .toast-icon { color: var(--accent); }
@keyframes toast-in { from{opacity:0;transform:translateX(20px)} to{opacity:1;transform:none} }

/* =========================================================
   RESPONSIVE
========================================================= */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-visual { display: none; }
  .hero-stats { justify-content: center; }
  .hero-btns { justify-content: center; }
  .hiw-steps { grid-template-columns: 1fr; }
  .hiw-connector { display: none; }
  .templates-grid { grid-template-columns: 1fr 1fr; }
  .guide-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .nav-links, .nav-cta { display: none; }
  .mobile-menu-btn { display: flex; }
  .builder-aside { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid.three { grid-template-columns: 1fr; }
  .preview-aside { display: none; }
  .pf-nav-links { display: none; }
  .resume-preview-scroll { padding: .5rem; }
  .templates-grid { grid-template-columns: 1fr; }
  .template-selector { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .hero-title { font-size: 2rem; }
  .section { padding: 3rem 0; }
  .hero-btns { flex-direction: column; }
  .floating-card.resume-mock { width: 280px; height: 180px; }
}

/* =========================================================
   CUSTOM SCROLL TO TOP BUTTON (ISOLATED & MODULAR)
========================================================= */
#custom-scroll-to-top-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: #2563eb;
  color: #ffffff;
  border: none;
  outline: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  z-index: 99999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              visibility 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              background-color 0.2s ease,
              box-shadow 0.2s ease;
  padding: 0;
  margin: 0;
  -webkit-tap-highlight-color: transparent;
}

#custom-scroll-to-top-btn.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#custom-scroll-to-top-btn:hover {
  background-color: #1d4ed8;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
  transform: translateY(-2px);
}

#custom-scroll-to-top-btn:active {
  transform: translateY(1px);
  background-color: #1e40af;
}

#custom-scroll-to-top-btn svg {
  display: block;
  pointer-events: none;
  transition: transform 0.2s ease;
}

#custom-scroll-to-top-btn:hover svg {
  transform: translateY(-2px);
}

@media (max-width: 640px) {
  #custom-scroll-to-top-btn {
    bottom: 20px;
    right: 20px;
    width: 42px;
    height: 42px;
  }
}
