/* ==========================================================================
   Serdar Balcı, MD - Compact Executive Resume & Print-Ready Stylesheet
   Swiss Minimalist Typography, High-Contrast, Pixel-Perfect Printing
   ========================================================================== */

:root {
  --bg-page: #f4f4f5;
  --bg-sheet: #ffffff;
  --text-dark: #18181b;
  --text-dim: #3f3f46;
  --text-muted: #71717a;
  --border-line: #e4e4e7;
  --border-dark: #27272a;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text-dark);
  line-height: 1.5;
  font-size: 13.5px;
  -webkit-font-smoothing: antialiased;
}

/* CV Format Switcher Bar (Screen Only) */
.cv-switcher-bar {
  background: #18181b;
  color: #fff;
  padding: 8px 16px;
  font-size: 0.85rem;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.switcher-container {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.switcher-label {
  color: #a1a1aa;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.switcher-links {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.switcher-btn {
  color: #d4d4d8;
  text-decoration: none;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.82rem;
  font-weight: 500;
  transition: all 0.15s;
}

.switcher-btn:hover {
  background: #27272a;
  color: #fff;
}

.switcher-btn.active {
  background: #fff;
  color: #000;
  font-weight: 700;
}

.view-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-toggle-view {
  background: #27272a;
  border: 1px solid #3f3f46;
  color: #fff;
  padding: 5px 12px;
  border-radius: 4px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-toggle-view:hover {
  background: #3f3f46;
}

.btn-print-primary {
  background: #2563eb;
  color: #fff;
  border: none;
  padding: 5px 14px;
  border-radius: 4px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-print-primary:hover {
  background: #1d4ed8;
}

/* Sheet Canvas (Paper emulation) */
.sheet-container {
  max-width: 900px;
  margin: 30px auto 60px;
  background: var(--bg-sheet);
  padding: 48px 56px;
  border: 1px solid var(--border-line);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

/* Header */
.resume-header {
  border-bottom: 2px solid var(--border-dark);
  padding-bottom: 18px;
  margin-bottom: 22px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
}

.header-name {
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 4px;
}

.header-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-dim);
  margin-bottom: 2px;
}

.header-affil {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.header-contact {
  font-size: 0.82rem;
  color: var(--text-dim);
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: right;
}

.header-contact i {
  color: var(--text-muted);
  width: 14px;
}

/* Section */
.resume-section {
  margin-bottom: 22px;
}

.section-title {
  font-size: 0.88rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--border-dark);
  border-bottom: 1px solid var(--border-dark);
  padding-bottom: 4px;
  margin-bottom: 10px;
}

.summary-text {
  font-size: 0.94rem;
  color: var(--text-dim);
  line-height: 1.6;
}

/* Skills */
.skills-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--text-dim);
}

.skill-group strong {
  color: var(--text-dark);
}

/* Timeline */
.compact-timeline {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.timeline-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
  font-size: 0.92rem;
}

.row-period {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.row-content strong {
  color: var(--text-dark);
}

.row-sub {
  font-size: 0.84rem;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.45;
}

/* 2-Column Education */
.compact-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 24px;
  font-size: 0.88rem;
  color: var(--text-dim);
}

.compact-grid-2 strong {
  color: var(--text-dark);
}

/* Software List */
.software-compact-list {
  list-style: disc;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.88rem;
  color: var(--text-dim);
}

.software-compact-list strong {
  color: var(--text-dark);
}

/* Publications */
.pub-section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.compact-pub-list {
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.86rem;
  color: var(--text-dim);
  line-height: 1.45;
}

.compact-pub-item strong {
  color: var(--text-dark);
}

.pub-meta-clean {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.compact-societies-text {
  font-size: 0.88rem;
  color: var(--text-dim);
  line-height: 1.55;
}

/* Footer */
.resume-footer {
  border-top: 1px solid var(--border-line);
  padding-top: 12px;
  margin-top: 24px;
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.font-mono {
  font-family: var(--font-mono);
}

/* View Mode Toggling */
body.mode-1page .expanded-only {
  display: none !important;
}

/* Mobile */
@media (max-width: 768px) {
  .sheet-container {
    padding: 24px 16px;
    margin: 10px;
  }
  .header-contact {
    text-align: left;
  }
  .timeline-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .compact-grid-2 {
    grid-template-columns: 1fr;
  }
}

/* Print Rules */
@page {
  size: A4;
  margin: 12mm 15mm;
}

@media print {
  body {
    background: #fff !important;
    color: #000 !important;
    font-size: 9.5pt !important;
    line-height: 1.35 !important;
  }

  .no-print, .cv-switcher-bar {
    display: none !important;
  }

  .sheet-container {
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
  }

  .resume-section {
    margin-bottom: 12pt !important;
    page-break-inside: avoid;
  }

  .section-title {
    font-size: 9.5pt !important;
    padding-bottom: 2pt !important;
    margin-bottom: 6pt !important;
  }

  .header-name {
    font-size: 16pt !important;
  }

  .header-contact {
    font-size: 8pt !important;
  }

  .compact-pub-list {
    font-size: 8pt !important;
    line-height: 1.25 !important;
  }

  .resume-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    font-size: 7.5pt !important;
  }
}
