/* ============================================================
   CSS VARIABLES
   ============================================================ */
:root {
    --primary: #2980b9;
    --primary-dark: #1a5276;
    --primary-light: #3498db;
    --dark: #1a1a2e;
    --text: #333333;
    --text-light: #666666;
    --bg: #f8f9fa;
    --white: #ffffff;
    --card-shadow: 0 4px 20px rgba(0,0,0,0.08);
    --card-radius: 12px;
    --font-main: 'Inter', -apple-system, sans-serif;
    --font-heading: 'Poppins', 'Inter', sans-serif;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-main);
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    background: rgba(26,26,46,0.95); backdrop-filter: blur(10px);
    padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,0.05);
}
.nav-container {
    max-width: 1100px; margin: 0 auto; padding: 0 24px;
    display: flex; justify-content: space-between; align-items: center;
}
.nav-logo {
    font-family: var(--font-heading); font-weight: 700; font-size: 1.3rem; color: var(--white);
}
.nav-logo span { color: var(--primary-light); margin-left: 6px; font-weight: 600; font-size: 0.9rem; }
.nav-links { display: flex; gap: 28px; }
.nav-links a { color: rgba(255,255,255,0.7); font-size: 0.9rem; font-weight: 500; transition: color 0.2s; }
.nav-links a:hover { color: var(--white); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
    position: relative; min-height: 420px; display: flex; align-items: center;
    justify-content: center; text-align: center; padding: 120px 24px 60px;
    overflow: hidden;
}
.hero-bg {
    position: absolute; inset: 0; z-index: 0;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 40%, #0f3460 70%, #1a5276 100%);
}
.hero-bg::after {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(ellipse at 30% 80%, rgba(41,128,185,0.15) 0%, transparent 60%),
                radial-gradient(ellipse at 70% 20%, rgba(52,152,219,0.1) 0%, transparent 50%);
}
.hero-content { position: relative; z-index: 1; }
.hero-photo {
    width: 120px; height: 120px; border-radius: 50%; margin: 0 auto 20px;
    border: 3px solid var(--primary-light); overflow: hidden;
    box-shadow: 0 4px 30px rgba(41,128,185,0.3);
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-initials {
    width: 100%; height: 100%; background: var(--primary);
    color: var(--white); font-size: 2.5rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}
.hero-name {
    font-family: var(--font-heading); font-size: 2.8rem; font-weight: 800;
    color: var(--white); margin-bottom: 8px;
}
.hero-title { color: var(--primary-light); font-size: 1.2rem; font-weight: 500; margin-bottom: 20px; }
.hero-links { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.hero-link {
    color: rgba(255,255,255,0.8); font-size: 0.85rem; padding: 6px 16px;
    border: 1px solid rgba(255,255,255,0.2); border-radius: 20px;
    transition: all 0.2s;
}
.hero-link:hover { background: rgba(255,255,255,0.1); color: var(--white); }

/* ============================================================
   SECTION TITLES
   ============================================================ */
.section-title {
    font-family: var(--font-heading); font-size: 1.8rem; font-weight: 700;
    color: var(--dark); margin-bottom: 8px; text-align: center;
}
.section-subtitle {
    text-align: center; color: var(--text-light); font-size: 0.95rem;
    max-width: 600px; margin: 0 auto 32px;
}

/* ============================================================
   PROFILE SECTION
   ============================================================ */
.profile-section { padding: 60px 0; }
.profile-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 24px; margin-top: 24px; }
.profile-card {
    background: var(--white); border-radius: var(--card-radius);
    padding: 28px; box-shadow: var(--card-shadow);
}
.profile-card h3 {
    font-family: var(--font-heading); font-size: 1.1rem; font-weight: 700;
    color: var(--primary-dark); margin-bottom: 16px;
    padding-bottom: 10px; border-bottom: 2px solid var(--primary);
}
/* Experience timeline */
.exp-timeline { display: flex; flex-direction: column; gap: 14px; }
.exp-item { display: flex; flex-direction: column; gap: 2px; padding-left: 14px; border-left: 2px solid #e0e0e0; }
.exp-role { font-weight: 600; font-size: 0.9rem; color: var(--dark); }
.exp-company { font-size: 0.82rem; color: var(--primary); }
.exp-period { font-size: 0.75rem; color: var(--text-light); }
/* Skills */
.skill-category { margin-bottom: 12px; }
.skill-category h4 { font-size: 0.8rem; font-weight: 600; color: var(--text-light); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.5px; }
.skill-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.skill-tags span {
    font-size: 0.75rem; padding: 3px 10px; border-radius: 12px;
    background: #eaf2f8; color: var(--primary-dark); font-weight: 500;
}
/* Projects list */
.projects-list { display: flex; flex-direction: column; gap: 8px; }
.project-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 8px 12px; border-radius: 8px; background: #f7f9fc; font-size: 0.85rem; font-weight: 500;
}
.project-item span { font-size: 0.72rem; color: var(--primary); font-weight: 400; }

/* ============================================================
   TAILOR SECTION
   ============================================================ */
.tailor-section { padding: 60px 0; background: var(--white); }
.tailor-form { max-width: 700px; margin: 0 auto; }
.form-group { margin-bottom: 20px; }
.form-group label {
    display: block; font-size: 0.9rem; font-weight: 600;
    color: var(--dark); margin-bottom: 6px;
}
.form-group input[type="text"],
.form-group textarea {
    width: 100%; padding: 12px 16px; border: 2px solid #e0e0e0;
    border-radius: 8px; font-family: var(--font-main); font-size: 0.9rem;
    transition: border-color 0.2s; resize: vertical;
}
.form-group input:focus, .form-group textarea:focus {
    outline: none; border-color: var(--primary);
}
.form-group input[type="file"] { font-size: 0.85rem; }
.btn-primary {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 14px 32px; background: var(--primary); color: var(--white);
    border: none; border-radius: 8px; font-size: 1rem; font-weight: 600;
    cursor: pointer; transition: all 0.2s; font-family: var(--font-main);
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.btn-icon { font-size: 1.1rem; }

/* ============================================================
   AGENT PANEL
   ============================================================ */
.agent-panel {
    max-width: 700px; margin: 40px auto 0; padding: 28px;
    background: #f7f9fc; border-radius: var(--card-radius); border: 1px solid #e8eef4;
}
.agent-panel h3 {
    font-family: var(--font-heading); font-size: 1.1rem; font-weight: 700;
    color: var(--dark); margin-bottom: 20px;
}
.agent-steps { display: flex; flex-direction: column; gap: 12px; }
.agent-step {
    display: flex; align-items: center; gap: 16px;
    padding: 14px 18px; background: var(--white); border-radius: 10px;
    border: 1px solid #e8eef4; transition: all 0.3s;
}
.agent-step.active { border-color: var(--primary); box-shadow: 0 2px 12px rgba(41,128,185,0.1); }
.agent-step.done { border-color: #27ae60; background: #f0faf4; }
.agent-icon {
    width: 36px; height: 36px; border-radius: 50%; display: flex;
    align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.85rem; color: var(--white);
    background: #bdc3c7; flex-shrink: 0; transition: background 0.3s;
}
.agent-step.active .agent-icon { background: var(--primary); }
.agent-step.done .agent-icon { background: #27ae60; }
.agent-info { flex: 1; }
.agent-info h4 { font-size: 0.9rem; font-weight: 600; color: var(--dark); }
.agent-info p { font-size: 0.78rem; color: var(--text-light); margin-top: 2px; }
.agent-status {
    font-size: 0.78rem; font-weight: 600; padding: 4px 12px;
    border-radius: 12px; background: #ecf0f1; color: #7f8c8d; white-space: nowrap;
}
.agent-step.active .agent-status { background: #eaf2f8; color: var(--primary); }
.agent-step.done .agent-status { background: #e8f8ef; color: #27ae60; }

@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.5} }
.agent-step.active .agent-status { animation: pulse 1.2s ease-in-out infinite; }

/* ============================================================
   ATS SCORE
   ============================================================ */
.ats-section { padding: 40px 0; }
.ats-card {
    display: flex; align-items: center; gap: 40px;
    max-width: 600px; margin: 0 auto; padding: 32px;
    background: var(--white); border-radius: var(--card-radius); box-shadow: var(--card-shadow);
}
.ats-score-circle { position: relative; width: 120px; height: 120px; flex-shrink: 0; }
.ats-score-circle svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ats-bg { fill: none; stroke: #ecf0f1; stroke-width: 8; }
.ats-progress {
    fill: none; stroke: #27ae60; stroke-width: 8;
    stroke-linecap: round; stroke-dasharray: 339.292;
    stroke-dashoffset: 339.292; transition: stroke-dashoffset 1.5s ease;
}
.ats-score-text {
    position: absolute; inset: 0; display: flex; align-items: center;
    justify-content: center; flex-direction: column;
}
.ats-score-text span { font-size: 2rem; font-weight: 800; color: var(--dark); line-height: 1; }
.ats-score-text small { font-size: 0.8rem; color: var(--text-light); }
.ats-details { flex: 1; }
.ats-details h3 { font-family: var(--font-heading); font-size: 1.1rem; font-weight: 700; color: var(--dark); margin-bottom: 12px; }
.ats-bar { margin-bottom: 8px; }
.ats-bar-label { display: flex; justify-content: space-between; font-size: 0.8rem; margin-bottom: 3px; }
.ats-bar-label span:first-child { color: var(--text); font-weight: 500; }
.ats-bar-label span:last-child { color: var(--primary); font-weight: 600; }
.ats-bar-track { height: 6px; background: #ecf0f1; border-radius: 3px; overflow: hidden; }
.ats-bar-fill { height: 100%; border-radius: 3px; background: var(--primary); transition: width 1s ease; }

/* ============================================================
   PREVIEW SECTION
   ============================================================ */
.preview-section { padding: 40px 0 80px; }
.preview-header {
    display: flex; justify-content: space-between; align-items: center;
    max-width: 800px; margin: 0 auto 24px;
}
.preview-actions { display: flex; gap: 12px; }
.resume-preview-container {
    max-width: 800px; margin: 0 auto;
    background: #ddd; padding: 20px; border-radius: 8px;
    display: flex; justify-content: center;
}

/* ============================================================
   RESUME TEMPLATE - matches original PDF design
   ============================================================ */
.resume-page {
    width: 794px; min-height: 1123px; background-color: #ffffff;
    display: flex; font-family: 'Calibri', 'Segoe UI', Arial, sans-serif;
    color: #333; font-size: 10px; line-height: 1.45; box-shadow: 0 2px 20px rgba(0,0,0,0.15);
    overflow: hidden; -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.resume-sidebar {
    width: 265px; padding: 0; display: flex; flex-direction: column;
    background: #ffffff; border-right: 1px solid #e8e8e8; flex-shrink: 0;
}
.resume-photo-area {
    width: 100%; display: flex; justify-content: center; padding: 25px 20px 15px;
}
.resume-photo-img {
    width: 120px; height: 120px; border-radius: 50%; object-fit: cover;
    border: 3px solid #2980b9; background: #eee;
}
.resume-photo-placeholder {
    width: 120px; height: 120px; border-radius: 50%;
    background: #2980b9; color: white; display: flex;
    align-items: center; justify-content: center;
    font-size: 36px; font-weight: 700;
}
.resume-name-area { text-align: center; padding: 0 20px 15px; }
.resume-name {
    font-size: 22px; font-weight: 700; color: #1a1a1a;
    line-height: 1.2; margin-bottom: 0;
}
.resume-sidebar-content { padding: 0 20px 20px; }
.resume-s-heading {
    font-size: 11px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 1.2px; color: #1a1a1a; padding-bottom: 5px;
    border-bottom: 2px solid #2980b9; margin-bottom: 8px; margin-top: 14px;
}
.resume-contact-item {
    display: flex; align-items: flex-start; gap: 8px;
    font-size: 8.5px; margin-bottom: 5px; color: #333; word-break: break-all;
}
.resume-contact-icon {
    width: 16px; height: 16px; background: #2980b9; color: white;
    border-radius: 3px; display: flex; align-items: center; justify-content: center;
    font-size: 9px; flex-shrink: 0; margin-top: 1px;
}
.resume-summary-text { font-size: 9px; color: #444; line-height: 1.5; text-align: justify; }
.resume-skill-group { margin-bottom: 6px; }
.resume-skill-label { font-size: 9.5px; font-weight: 700; color: #1a1a1a; text-decoration: underline; margin-bottom: 2px; }
.resume-skill-items { font-size: 9px; color: #444; }
.resume-cert-item { font-size: 8.5px; color: #444; margin-bottom: 4px; padding-left: 12px; position: relative; }
.resume-cert-item::before { content: '\25B8'; position: absolute; left: 0; color: #2980b9; }

/* Right Main Content */
.resume-main {
    flex: 1; padding: 25px 28px 20px 25px; overflow: hidden;
}
.resume-m-heading {
    font-size: 13px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 1px; color: #1a1a1a; padding-bottom: 5px;
    border-bottom: 2px solid #2980b9; margin-bottom: 10px; margin-top: 0;
}
.resume-m-heading + .resume-m-heading,
.resume-edu-block + .resume-m-heading,
.resume-exp-block + .resume-m-heading,
.resume-proj-block + .resume-m-heading { margin-top: 14px; }

/* Education */
.resume-edu-block { margin-bottom: 8px; }
.resume-edu-row { display: flex; justify-content: space-between; align-items: baseline; }
.resume-edu-degree { font-size: 10.5px; font-weight: 700; color: #1a1a1a; }
.resume-edu-year { font-size: 9.5px; color: #555; font-weight: 500; }
.resume-edu-school { font-size: 9px; color: #555; font-style: italic; }

/* Experience */
.resume-exp-block { margin-bottom: 12px; }
.resume-exp-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 1px; }
.resume-exp-company { font-size: 11px; font-weight: 700; color: #1a1a1a; }
.resume-exp-period { font-size: 9px; color: #555; font-weight: 500; text-transform: uppercase; }
.resume-exp-role { font-size: 9.5px; font-style: italic; color: #444; margin-bottom: 4px; }
.resume-exp-bullets { padding-left: 16px; }
.resume-exp-bullets li { font-size: 9.5px; color: #333; margin-bottom: 3px; list-style: disc; line-height: 1.4; }

/* Projects */
.resume-proj-block { margin-bottom: 10px; }
.resume-proj-title { font-size: 10.5px; margin-bottom: 3px; }
.resume-proj-name { font-weight: 700; color: #1a1a1a; }
.resume-proj-tech { font-weight: 400; color: #555; }
.resume-proj-bullets { padding-left: 16px; }
.resume-proj-bullets li { font-size: 9.5px; color: #333; margin-bottom: 3px; list-style: disc; line-height: 1.4; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
    background: var(--dark); color: rgba(255,255,255,0.6);
    padding: 30px 0; text-align: center; font-size: 0.85rem;
}
.footer-links { display: flex; gap: 20px; justify-content: center; margin-top: 10px; }
.footer-links a { color: var(--primary-light); font-size: 0.85rem; }
.footer-links a:hover { color: var(--white); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
    .profile-grid { grid-template-columns: 1fr; }
    .hero-name { font-size: 2rem; }
    .ats-card { flex-direction: column; text-align: center; }
    .preview-header { flex-direction: column; gap: 12px; text-align: center; }
}
@media (max-width: 600px) {
    .nav-links { display: none; }
    .hero-name { font-size: 1.6rem; }
    .hero-links { flex-direction: column; align-items: center; }
    .resume-preview-container { padding: 10px; overflow-x: auto; }
}
