:root {
  --sidebar-bg: #1e2530;
  --main-bg: #ffffff;
  --text-dark: #1f2937;
  --text-light: #f3f4f6;
  --text-muted: #4b5563;
  --accent-blue: #2563eb;
  --accent-light: #9ca3af;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { 
  background-color: #1e3a5f; 
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text-dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 20px;
}

/* Resume Document Wrapper replicating image_1c180c.png structure */
.resume-canvas {
  width: 100%;
  max-width: 1000px;
  min-height: 1300px;
  background: var(--main-bg);
  display: grid;
  grid-template-columns: 320px 1fr;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
  position: relative;
}

/* Floating Download Action Button */
#download-fab {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 1000;
  background: var(--accent-blue);
  color: #ffffff;
  border: none;
  padding: 13px 24px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  box-shadow: 0 4px 18px rgba(37, 99, 235, 0.5);
  transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
}
#download-fab:hover {
  background: #1d4ed8;
  box-shadow: 0 6px 24px rgba(37, 99, 235, 0.65);
  transform: translateY(-2px);
}
#download-fab:active { transform: translateY(0); }
#download-fab:disabled { opacity: 0.65; cursor: not-allowed; transform: none; }

/* ==========================================
   LEFT SIDEBAR SYSTEM (Dark Profile Panel)
   ========================================== */
.sidebar {
  background-color: var(--sidebar-bg);
  color: var(--text-light);
  padding: 40px 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Avatar with SVG monogram fallback */
.avatar-wrapper {
  position: relative;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.12);
  margin-bottom: 32px;
  background: #1d3461;
  flex-shrink: 0;
}
.avatar-monogram {
  position: absolute;
  width: 100%;
  height: 100%;
}
.profile-avatar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.sidebar-section {
  width: 100%;
  margin-bottom: 35px;
}
.sidebar-title {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding-bottom: 6px;
  margin-bottom: 15px;
  font-weight: 700;
  color: #e5e7eb;
}
.sidebar-content {
  font-size: 0.85rem;
  line-height: 1.6;
  color: #cbd5e1;
}
.sidebar-content p {
  margin-bottom: 12px;
}

/* Contact Items with SVG Icons */
.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-bottom: 11px;
  font-size: 0.82rem;
  color: #cbd5e1;
  line-height: 1.4;
}
.contact-item svg { flex-shrink: 0; margin-top: 1px; opacity: 0.7; }
.contact-item a { color: #cbd5e1; text-decoration: none; }
.contact-item a:hover { color: #93c5fd; text-decoration: underline; }

/* Skill Pill Badges */
.skill-group-label {
  font-weight: 600;
  font-size: 0.78rem;
  color: #e2e8f0;
  margin-top: 14px;
  margin-bottom: 7px;
}
.skill-badges { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 6px; }
.skill-badge {
  display: inline-block;
  background: rgba(37, 99, 235, 0.2);
  color: #93c5fd;
  border: 1px solid rgba(37, 99, 235, 0.35);
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.4;
}

/* ==========================================
   MAIN CANVAS SYSTEM (Clean Content Panel)
   ========================================== */
.main-panel {
  padding: 50px 45px;
  background: var(--main-bg);
}

.main-header {
  margin-bottom: 40px;
  border-bottom: 2px solid var(--text-dark);
  padding-bottom: 20px;
}
.main-header h1 {
  font-size: 2.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 1.0;
  color: var(--text-dark);
}
.main-header .title-sub {
  font-size: 1.1rem;
  color: var(--accent-blue);
  font-weight: 600;
  margin-top: 8px;
}

/* Structural Timelines modeled after image_1c180c.png */
.section-title {
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dark);
  border-bottom: 1px solid #d1d5db;
  padding-bottom: 4px;
  margin-top: 30px;
  margin-bottom: 20px;
  font-weight: 700;
}

.timeline-node {
  display: grid;
  grid-template-columns: 180px 1fr;
  margin-bottom: 24px;
  gap: 16px;
}
.node-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
}
.node-meta strong {
  color: var(--text-dark);
  display: block;
  font-size: 0.95rem;
}
.node-body h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 6px;
}
.node-body p {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: justify;
  margin-bottom: 8px;
}
.node-body ul {
  list-style-type: square;
  padding-left: 18px;
}
.node-body li {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

/* Credentials sub-headings (Certifications, Honors, Academic) */
.credentials-h3 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent-blue);
  margin: 18px 0 8px;
}

/* Summary & Core Focus content outside .node-body */
#main-timeline-content > p {
  font-size: 0.875rem;
  color: var(--text-muted);
  text-align: justify;
  margin-bottom: 10px;
  line-height: 1.65;
}
#main-timeline-content > ul {
  list-style-type: square;
  padding-left: 20px;
  margin-bottom: 16px;
}
#main-timeline-content > ul > li {
  font-size: 0.845rem;
  color: var(--text-muted);
  margin-bottom: 6px;
  line-height: 1.55;
}
#main-timeline-content > ul > li > strong { color: var(--text-dark); font-weight: 600; }

/* Thought of the Day — above-canvas banner */
.thought-banner {
  width: 100%;
  max-width: 1000px;
  margin-bottom: 18px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-left: 3px solid #60a5fa;
  border-radius: 6px;
  padding: 14px 20px;
  box-sizing: border-box;
}
.thought-banner-icon {
  flex-shrink: 0;
  margin-top: 1px;
  color: #60a5fa;
  opacity: 0.85;
}
.thought-banner-body { flex: 1; }
.thought-banner-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #60a5fa;
  margin-bottom: 5px;
}
.thought-banner-text {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.75);
  font-style: italic;
  line-height: 1.6;
}

/* PDF Timestamp Footer */
.pdf-timestamp {
  display: none;
  margin-top: 18px;
  padding-top: 10px;
  border-top: 1px solid #e5e7eb;
  font-size: 0.7rem;
  color: #9ca3af;
  text-align: right;
}

/* Printable Sandbox */
#pdf-sandbox { display: none; width: 210mm; background: #fff; }
.page-break { display: none; }

@media print {
  .page-break { display: block; page-break-before: always; }
  #download-fab { display: none; }
  .thought-banner { display: none; }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .resume-canvas { grid-template-columns: 260px 1fr; }
  .main-panel { padding: 40px 32px; }
}

@media (max-width: 768px) {
  .resume-canvas { grid-template-columns: 1fr; }
  .main-panel { padding: 40px 32px; }
  .main-header h1 { font-size: 2.1rem; }
  #download-fab { bottom: 20px; right: 20px; padding: 11px 20px; }
}

@media (max-width: 640px) {
  body { padding: 24px 12px; }
  .main-panel { padding: 32px 24px; }
  .main-header h1 { font-size: 1.9rem; }
  .timeline-node { grid-template-columns: 1fr; gap: 4px; }
  .node-meta { font-size: 0.78rem; }
  .sidebar { padding: 32px 22px; }
}

@media (max-width: 480px) {
  body { padding: 16px 8px; }
  .resume-canvas { box-shadow: none; }
  .main-panel { padding: 24px 18px; }
  .main-header h1 { font-size: 1.65rem; }
  .section-title { font-size: 0.78rem; margin-top: 24px; }
  .avatar-wrapper { width: 110px; height: 110px; }
  #download-fab { bottom: 16px; right: 16px; padding: 10px 16px; font-size: 13px; }
}
