/* Resume Builder — Cyan theme */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #00B4D8;
  --primary-dim: rgba(0,180,216,0.12);
  --primary-glow: rgba(0,180,216,0.3);
  --accent: #48CAE4;
  --bg: #0D1117;
  --bg-card: #161B22;
  --bg-input: #0C1018;
  --bg-hover: #1C2333;
  --border: rgba(0,180,216,0.15);
  --border-focus: rgba(0,180,216,0.5);
  --text: #E6EDF3;
  --text-dim: #8B949E;
  --text-muted: #484F58;
  --green: #34D399;
  --red: #F87171;
  --red-dim: rgba(248,113,113,0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --font: 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', monospace;
  --transition: 0.2s ease;
}

html { font-size: 16px; -webkit-font-smoothing: antialiased; }
body { font-family: var(--font); background: var(--bg); color: var(--text); min-height: 100vh; line-height: 1.6; }

.header { border-bottom: 1px solid var(--border); background: rgba(22,27,34,0.9); backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 10; }
.header-inner { max-width: 1200px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; justify-content: space-between; }
.header-left { display: flex; align-items: center; gap: 10px; }
.logo-icon { font-size: 1.2rem; width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; background: var(--primary-dim); border-radius: var(--radius-sm); }
.header h1 { font-size: 1.05rem; font-weight: 700; }
.subtitle { font-size: 0.72rem; color: var(--text-dim); }
.header-actions { display: flex; gap: 6px; }

.btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; font-family: var(--font); font-size: 0.8rem; font-weight: 500; border: none; border-radius: 6px; cursor: pointer; transition: all var(--transition); }
.btn-primary { background: linear-gradient(135deg, var(--primary), #0096B4); color: #0D1117; font-weight: 600; }
.btn-primary:hover { box-shadow: 0 4px 16px var(--primary-glow); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--text-dim); border: 1px solid var(--border); }
.btn-ghost:hover { color: var(--text); border-color: var(--primary); background: var(--primary-dim); }
.btn-sm { padding: 5px 10px; font-size: 0.78rem; }

.main { max-width: 1200px; margin: 0 auto; padding: 20px; }
.layout { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; min-height: calc(100vh - 100px); }

.editor-panel, .preview-panel { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); display: flex; flex-direction: column; overflow: hidden; }
.panel-header { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.panel-label { font-size: 0.75rem; font-weight: 600; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.04em; }

.editor-content { flex: 1; overflow-y: auto; padding: 12px; }
.section-block { margin-bottom: 14px; }
.section-title { font-size: 0.82rem; font-weight: 600; color: var(--primary); margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.add-btn { padding: 1px 6px; font-size: 0.72rem; border: 1px solid var(--border); border-radius: 4px; background: none; color: var(--accent); cursor: pointer; }
.add-btn:hover { background: var(--primary-dim); }

.field-row { display: flex; gap: 6px; align-items: center; margin-bottom: 4px; }
.field-row label { font-size: 0.72rem; color: var(--text-muted); min-width: 60px; }
.field-row input, textarea { flex: 1; padding: 5px 8px; font-family: var(--font); font-size: 0.78rem; color: var(--text); background: var(--bg-input); border: 1px solid var(--border); border-radius: 4px; outline: none; }
.field-row input:focus, textarea:focus { border-color: var(--border-focus); }
textarea { width: 100%; padding: 6px 8px; font-family: var(--font); font-size: 0.78rem; color: var(--text); background: var(--bg-input); border: 1px solid var(--border); border-radius: 4px; outline: none; resize: vertical; }

.entry-block { background: var(--bg); border: 1px solid rgba(0,180,216,0.08); border-radius: 6px; padding: 8px; margin-bottom: 6px; position: relative; }
.entry-block .remove-entry { position: absolute; top: 4px; right: 4px; background: none; border: none; color: var(--red); cursor: pointer; font-size: 0.72rem; padding: 2px 4px; border-radius: 4px; }
.entry-block .remove-entry:hover { background: var(--red-dim); }
.entry-field { display: flex; gap: 4px; align-items: center; margin-bottom: 3px; }
.entry-field label { font-size: 0.68rem; color: var(--text-muted); min-width: 50px; }
.entry-field input, .entry-field textarea { flex: 1; padding: 3px 6px; font-family: var(--font); font-size: 0.72rem; color: var(--text); background: var(--bg-input); border: 1px solid var(--border); border-radius: 3px; outline: none; }
.entry-field textarea { min-height: 28px; resize: vertical; }

/* Resume Preview */
.resume-preview { flex: 1; overflow-y: auto; background: #fff; color: #1a1a1a; padding: 32px; font-family: 'Inter', sans-serif; font-size: 10px; line-height: 1.5; }
.resume-preview .r-name { font-size: 20px; font-weight: 800; color: #111; margin-bottom: 2px; }
.resume-preview .r-jobtitle { font-size: 12px; color: #555; margin-bottom: 4px; }
.resume-preview .r-contact { font-size: 9px; color: #888; margin-bottom: 12px; }
.resume-preview .r-section { margin-bottom: 10px; }
.resume-preview .r-section-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #0096B4; border-bottom: 1px solid #ddd; padding-bottom: 2px; margin-bottom: 6px; }
.resume-preview .r-summary { font-size: 9.5px; color: #444; }
.resume-preview .r-entry { margin-bottom: 6px; }
.resume-preview .r-entry-header { display: flex; justify-content: space-between; align-items: baseline; }
.resume-preview .r-entry-title { font-size: 10px; font-weight: 600; }
.resume-preview .r-entry-date { font-size: 8.5px; color: #888; }
.resume-preview .r-entry-sub { font-size: 9px; color: #666; }
.resume-preview .r-entry-desc { font-size: 9px; color: #444; margin-top: 2px; }
.resume-preview .r-skills { display: flex; flex-wrap: wrap; gap: 4px; }
.resume-preview .r-skill { padding: 2px 6px; background: #f0f0f0; border-radius: 3px; font-size: 8.5px; color: #333; }

.toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 200; display: flex; flex-direction: column-reverse; gap: 8px; }
.toast { padding: 10px 16px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: 0 4px 24px rgba(0,0,0,0.5); font-size: 0.82rem; animation: toastIn 0.3s ease; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 768px) { .layout { grid-template-columns: 1fr; } }
@media print { body { background: #fff; } .header, .editor-panel, .toast-container { display: none !important; } .layout { display: block; } .preview-panel { border: none; background: none; } .resume-preview { padding: 0; } }
