@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
  --bg-color: #0b0f19;
  --bg-gradient: radial-gradient(circle at 50% 50%, #151b2d 0%, #0b0f19 100%);
  --panel-bg: rgba(21, 27, 45, 0.7);
  --panel-border: rgba(255, 255, 255, 0.08);
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  
  --primary: #6366f1;
  --secondary: #a855f7;
  
  --font-display: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  
  --radius-md: 12px;
  --radius-full: 9999px;
  
  --transition: 0.2s ease;
}

/* Base styling for browser view */
body {
  background: var(--bg-gradient);
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.5;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Top control banner */
.control-banner {
  width: 100%;
  max-width: 820px;
  margin-top: 2rem;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: var(--radius-md);
  background: var(--panel-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--panel-border);
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  z-index: 10;
}

.control-btn-group {
  display: flex;
  gap: 1rem;
}

.control-btn {
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  border: none;
  transition: var(--transition);
}

.btn-back {
  background: var(--panel-border);
  color: var(--text-primary);
}

.btn-back:hover {
  background: rgba(255,255,255,0.15);
}

.btn-print {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-print:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
}

/* Resume Container (A4 Proportions) */
.resume-paper {
  background: #ffffff;
  color: #1f2937;
  width: 210mm;
  height: 297mm;
  padding: 15mm;
  margin: 2rem 0;
  box-sizing: border-box;
  box-shadow: 0 10px 40px rgba(0,0,0,0.4);
  border-radius: 4px;
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 2.8fr 1.2fr;
  gap: 15px;
}

/* Layout Columns */
.resume-main-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.resume-sidebar-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background-color: #f9fafb;
  border-left: 1px solid #e5e7eb;
  padding-left: 15px;
  height: 100%;
}

/* Header Section */
.resume-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #e5e7eb;
  padding-bottom: 12px;
}

.header-text h1 {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 800;
  margin: 0;
  line-height: 1.1;
  color: #111827;
  letter-spacing: -0.5px;
}

.header-text h2 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  margin: 4px 0 0 0;
  color: #4f46e5;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.header-photo-wrapper {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 2px solid #e5e7eb;
}

.header-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Common Section Styles */
.resume-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.resume-section-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #111827;
  margin: 0 0 4px 0;
  letter-spacing: 1px;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 3px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.resume-section-title svg {
  width: 14px;
  height: 14px;
  color: #4f46e5;
}

/* Profile Summary */
.summary-text {
  font-size: 0.82rem;
  color: #4b5563;
  margin: 0;
  text-align: justify;
}

/* Experience & Projects */
.resume-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.resume-item-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.resume-item-title {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  color: #111827;
  margin: 0;
}

.resume-item-subtitle {
  font-weight: 600;
  color: #4f46e5;
  font-size: 0.8rem;
  margin: 0;
}

.resume-item-date {
  font-size: 0.75rem;
  font-weight: 600;
  color: #6b7280;
  white-space: nowrap;
}

.resume-item-desc {
  list-style-type: none;
  padding-left: 0;
  margin: 0;
}

.resume-item-desc li {
  font-size: 0.78rem;
  color: #4b5563;
  position: relative;
  padding-left: 10px;
  margin-bottom: 2px;
}

.resume-item-desc li::before {
  content: "•";
  color: #4f46e5;
  position: absolute;
  left: 0;
  font-weight: bold;
}

.project-tech {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  color: #2563eb;
  margin: 1px 0;
}

.project-links {
  font-size: 0.72rem;
  color: #4b5563;
  margin: 0;
}

.project-links a {
  color: #4f46e5;
  text-decoration: none;
  font-weight: 600;
}

/* Contact Info (Sidebar) */
.sidebar-contact {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.75rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #4b5563;
  text-decoration: none;
}

.contact-item svg {
  width: 12px;
  height: 12px;
  color: #4f46e5;
  flex-shrink: 0;
}

.contact-item span {
  word-break: break-all;
}

/* Education (Sidebar) */
.edu-item {
  margin-bottom: 4px;
}
.edu-degree {
  font-weight: 700;
  font-size: 0.8rem;
  color: #111827;
  margin: 0;
}
.edu-inst {
  font-size: 0.75rem;
  color: #4b5563;
  margin: 0;
}
.edu-dates {
  font-size: 0.7rem;
  font-weight: 600;
  color: #6b7280;
  margin: 0;
}

/* Skill Tags (Sidebar) */
.sidebar-skills {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.skill-group-title {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  color: #111827;
  margin: 0 0 4px 0;
  text-transform: uppercase;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.skill-tag {
  font-size: 0.7rem;
  font-weight: 500;
  background-color: #e0e7ff;
  color: #312e81;
  padding: 2px 6px;
  border-radius: 4px;
}

/* Interests, Languages, Certifications (Sidebar) */
.sidebar-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-list li {
  font-size: 0.75rem;
  color: #4b5563;
  margin-bottom: 3px;
  position: relative;
  padding-left: 10px;
}

.sidebar-list li::before {
  content: "›";
  color: #4f46e5;
  position: absolute;
  left: 0;
  font-weight: bold;
  font-size: 0.85rem;
  top: -1px;
}

/* Printing Specific Overrides */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  
  .control-banner {
    display: none !important;
  }
  
  .resume-paper {
    box-shadow: none !important;
    border: none !important;
    border-radius: 0 !important;
    margin: 0 !important;
    width: 210mm !important;
    height: 297mm !important;
    padding: 12mm !important;
    page-break-after: avoid;
    page-break-inside: avoid;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .resume-sidebar-col {
    background-color: #f9fafb !important;
    border-left: 1px solid #e5e7eb !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .skill-tag {
    background-color: #e0e7ff !important;
    color: #312e81 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  @page {
    size: A4 portrait;
    margin: 0;
  }
}
