/* resume template — clean, dense, document-feeling, printable. */

:root {
  --container: 720px;
  --space-1: 4px;  --space-2: 8px;  --space-3: 12px;
  --space-4: 16px; --space-5: 24px; --space-6: 32px;
  --space-7: 48px; --space-8: 64px; --space-9: 96px;
  --radius: 6px; --radius-lg: 12px;
  --transition: 180ms ease;
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Source Serif Pro", "Iowan Old Style", "Georgia", serif;
}

[data-density="compact"]     { --section-pad: var(--space-5); --hero-pad: var(--space-6); }
[data-density="comfortable"] { --section-pad: var(--space-6); --hero-pad: var(--space-7); }
[data-density="airy"]        { --section-pad: var(--space-7); --hero-pad: var(--space-8); }

[data-theme="light"] { --bg: #fdfcf8; --fg: #1a1814; --muted: #5b574c; --surface: #f4f0e6; --border: #e3ddc8; --on-primary: #fdfcf8; }
[data-theme="dark"]  { --bg: #14130f; --fg: #f0ece0; --muted: #a09988; --surface: #1c1a14; --border: #2a2620; --on-primary: #14130f; }
[data-theme="ai"]    { --bg: #0a0c10; --fg: #ecf0fa; --muted: #94a3bd; --surface: #11141a; --border: #1c2235; --on-primary: #0a0c10; }

[data-palette="slate"]   { --primary: #1f2937; --primary-hover: #0f172a; --accent: #64748b; }
[data-palette="indigo"]  { --primary: #3730a3; --primary-hover: #312e81; --accent: #6366f1; }
[data-palette="emerald"] { --primary: #047857; --primary-hover: #065f46; --accent: #10b981; }
[data-palette="rose"]    { --primary: #9f1239; --primary-hover: #881337; --accent: #e11d48; }
[data-palette="amber"]   { --primary: #92400e; --primary-hover: #78350f; --accent: #d97706; }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { background: var(--bg); color: var(--fg); font-family: var(--font-sans); line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--primary-hover); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--space-5); }

/* BUTTONS */
.btn { display: inline-flex; align-items: center; gap: var(--space-2); padding: 10px 18px; border-radius: var(--radius); font-weight: 600; transition: var(--transition); border: 1px solid transparent; text-decoration: none; }
.btn-sm { padding: 6px 12px; font-size: 0.9rem; }
.btn-lg { padding: 14px 24px; font-size: 1.05rem; }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover, .btn-primary:focus-visible { background: var(--primary-hover); text-decoration: none; }

/* HEADER */
.resume-header { padding: var(--hero-pad) 0; border-bottom: 2px solid var(--fg); }
.header-inner { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-5); }
.header-text { flex: 1; }
.header-name { font-family: var(--font-serif); font-weight: 700; font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.15; margin: 0 0 var(--space-1); letter-spacing: -0.02em; }
.header-title { color: var(--muted); font-size: 1.1rem; margin: 0 0 var(--space-4); font-weight: 500; }
.header-contact { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); font-size: 0.9rem; }
.header-contact li { white-space: nowrap; }
.header-contact a { color: var(--primary); }
.header-photo { flex-shrink: 0; }
.header-photo img { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); }
@media (max-width: 520px) {
  .header-inner { flex-direction: column-reverse; align-items: center; text-align: center; }
  .header-contact { justify-content: center; }
  .header-photo img { width: 72px; height: 72px; }
}

/* SECTION HEADINGS */
.section-heading { font-family: var(--font-serif); font-weight: 700; font-size: 1.2rem; text-transform: uppercase; letter-spacing: 0.06em; margin: 0 0 var(--space-4); padding-bottom: var(--space-2); border-bottom: 1px solid var(--border); color: var(--primary); }

/* SUMMARY */
.summary { padding: var(--section-pad) 0; }
.summary-body { font-size: 1rem; color: var(--fg); max-width: 64ch; line-height: 1.7; }
.summary-body p { margin: 0 0 var(--space-3); }
.summary-body p:last-child { margin-bottom: 0; }
.summary-body strong { font-weight: 700; }

/* EXPERIENCE */
.experience { padding: var(--section-pad) 0; }
.experience-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0; }
.experience-entry { padding: var(--space-4) 0 var(--space-4) var(--space-5); border-left: 2px solid var(--border); position: relative; }
.experience-entry::before { content: ""; position: absolute; left: -5px; top: 22px; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }
.experience-row { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-3); flex-wrap: wrap; margin-bottom: var(--space-2); }
.experience-left { display: flex; flex-direction: column; gap: 0; }
.experience-role { font-family: var(--font-serif); font-weight: 700; font-size: 1.1rem; margin: 0; }
.experience-company { font-weight: 600; color: var(--muted); font-size: 0.95rem; }
.experience-location { color: var(--muted); font-size: 0.85rem; }
.experience-dates { color: var(--muted); font-size: 0.85rem; white-space: nowrap; flex-shrink: 0; }
.experience-desc { font-size: 0.95rem; color: var(--fg); line-height: 1.65; max-width: 60ch; }
.experience-desc p { margin: 0 0 var(--space-2); }
.experience-desc p:last-child { margin-bottom: 0; }

/* EDUCATION */
.education { padding: var(--section-pad) 0; }
.education-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0; }
.education-entry { padding: var(--space-3) 0; border-bottom: 1px dashed var(--border); }
.education-entry:last-child { border-bottom: 0; }
.education-row { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-3); flex-wrap: wrap; }
.education-left { display: flex; flex-direction: column; gap: 0; }
.education-degree { font-family: var(--font-serif); font-weight: 700; font-size: 1.05rem; margin: 0; }
.education-institution { color: var(--muted); font-size: 0.95rem; }
.education-dates { color: var(--muted); font-size: 0.85rem; white-space: nowrap; flex-shrink: 0; }
.education-notes { color: var(--muted); font-size: 0.9rem; margin: var(--space-1) 0 0; }

/* SKILLS */
.skills { padding: var(--section-pad) 0; }
.skills-groups { display: flex; flex-direction: column; gap: var(--space-4); }
.skills-group-label { font-weight: 700; font-size: 0.9rem; margin: 0 0 var(--space-2); color: var(--fg); }
.skills-pills { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: var(--space-2); }
.skill-pill { display: inline-block; padding: 3px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; font-size: 0.85rem; color: var(--fg); white-space: nowrap; }

/* CERTIFICATIONS */
.certifications { padding: var(--section-pad) 0; }
.certifications-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--space-3); }
.cert-entry { display: flex; align-items: baseline; gap: var(--space-3); flex-wrap: wrap; padding: var(--space-2) 0; border-bottom: 1px dashed var(--border); }
.cert-entry:last-child { border-bottom: 0; }
.cert-name { font-weight: 700; font-size: 0.95rem; }
.cert-meta { color: var(--muted); font-size: 0.85rem; }

/* CTA */
.cta { padding: var(--section-pad) 0; background: var(--primary); color: var(--on-primary); margin-top: var(--space-6); }
.cta-inner { max-width: 600px; }
.cta-heading { font-family: var(--font-serif); font-weight: 700; font-size: clamp(1.4rem, 2.5vw, 1.8rem); margin: 0 0 var(--space-3); letter-spacing: -0.02em; }
.cta-body { font-size: 1rem; opacity: 0.9; margin: 0 0 var(--space-5); }
.cta .btn-primary { background: var(--bg); color: var(--fg); }
.cta .btn-primary:hover { background: var(--surface); }

/* FOOTER + WATERMARK */
.ddv-footer { padding: var(--space-6) 0; border-top: 1px solid var(--border); margin-top: 0; text-align: center; color: var(--muted); }
.ddv-footer-inner small { font-size: 0.85rem; }
.ddv-watermark { position: fixed; bottom: 12px; right: 12px; z-index: 50; }
.ddv-watermark a { display: inline-flex; align-items: center; padding: 6px 10px; background: var(--bg); color: var(--muted); border: 1px solid var(--border); border-radius: 999px; font-size: 0.78rem; box-shadow: 0 1px 4px rgba(0,0,0,0.06); text-decoration: none; }
.ddv-watermark a:hover { color: var(--fg); }
