:root {
  --bg-primary: #000;
  --bg-secondary: #111;
  --text-primary: #fff;
  --text-secondary: #aaa;
  --accent-primary: #20b2aa;
  --accent-secondary: #55c5bd;
  --accent-tertiary: #66b8b0;
  --accent-quaternary: #599;
  --border: #333;
}

/* Light theme - apply to body and all elements */
.theme-toggle-input:not(:checked) ~ .app-layout {
  --bg-primary: #fff;
  --bg-secondary: #f5f5f5;
  --text-primary: #000;
  --text-secondary: #666;
  --accent-primary: #20b2aa;
  --accent-secondary: #55c5bd;
  --accent-tertiary: #66b8b0;
  --accent-quaternary: #599;
  --border: #ccc;
}

.theme-toggle-input:not(:checked) ~ .app-layout * {
  --bg-primary: #fff;
  --bg-secondary: #f5f5f5;
  --text-primary: #000;
  --text-secondary: #666;
  --border: #ccc;
}

/* Apply light theme to all elements when input is unchecked */
.theme-toggle-input:not(:checked) ~ *,
.theme-toggle-input:not(:checked) {
  --bg-primary: #fff;
  --bg-secondary: #f5f5f5;
  --text-primary: #000;
  --text-secondary: #666;
  --accent-primary: #20b2aa;
  --accent-secondary: #55c5bd;
  --accent-tertiary: #66b8b0;
  --accent-quaternary: #599;
  --border: #ccc;
}

/* Apply light theme to html and body when input is not checked */
body:has(.theme-toggle-input:not(:checked)) {
  --bg-primary: #fff;
  --bg-secondary: #f5f5f5;
  --text-primary: #000;
  --text-secondary: #666;
  --accent-primary: #20b2aa;
  --accent-secondary: #55c5bd;
  --accent-tertiary: #66b8b0;
  --accent-quaternary: #599;
  --border: #ccc;
  background: #fff !important;
}

html:has(.theme-toggle-input:not(:checked)) {
  --bg-primary: #fff;
  background: #fff !important;
}

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

html {
  scroll-behavior: smooth;
  background: var(--bg-primary);
}

body {
  font-family: "Source Code Pro", "Consolas", "Monaco", monospace;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-primary);
  font-weight: 400;
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

.app-layout {
  display: flex;
  min-height: 100vh;
}

.left-pane {
  width: 50%;
  background: var(--bg-primary);
  padding: 3rem 4rem 3rem 4rem;
  position: fixed;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding-top: 6rem;
  max-width: 50vw;
  box-sizing: border-box;
}

.right-pane {
  width: 50%;
  margin-left: 50%;
  min-height: 100vh;
  background: var(--bg-primary);
  position: relative;
  max-width: 50vw;
  box-sizing: border-box;
}

.terminal-window {
  margin: 0;
  background: var(--bg-primary);
}

.terminal-content {
  padding: 2rem 2rem 2rem;
  padding-top: 10rem; /* Align section header with subtitle baseline */
  background: var(--bg-primary);
}

.container {
  max-width: none;
  margin: 0;
  padding: 0;
  background: transparent;
}

.profile-header {
  text-align: left;
  margin-bottom: 2rem;
  position: relative;
  z-index: 10;
}

.title {
  font-family: "JetBrains Mono", monospace;
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.subtitle {
  font-family: "Source Code Pro", monospace;
  font-size: 1.5rem;
  font-weight: 500;
  margin-bottom: 0;
  color: var(--accent-primary);
  line-height: 1.4;
  letter-spacing: 0.05em;
  text-transform: none;
}

.contact-links {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 1.5rem;
  margin-top: auto;
  padding-bottom: 2rem;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: var(--text-secondary);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  transition: all 0.3s ease;
  position: relative;
}

.contact-link:hover {
  color: var(--accent-primary);
  border-color: var(--accent-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(32, 178, 170, 0.2);
}

.contact-link svg {
  width: 18px;
  height: 18px;
}

/* Print button styling - inherits all contact-link styles */
.print-link {
  background: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
}

/* Terminal Theme Toggle */
.theme-toggle-input {
  display: none;
}

.theme-toggle-label {
  position: fixed;
  top: 2rem;
  right: 2rem;
  z-index: 1000;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Dark mode button (default - checkbox checked) */
.theme-toggle-input:checked + .theme-toggle-label {
  background: #111;
  color: #aaa;
  border: 1px solid #333;
}

/* Light mode button (checkbox unchecked) */
.theme-toggle-input:not(:checked) + .theme-toggle-label {
  background: #f5f5f5;
  color: #666;
  border: 1px solid #ccc;
}

.theme-toggle-label:hover {
  background: var(--accent-primary) !important;
  color: var(--bg-primary) !important;
  border-color: var(--accent-primary) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(32, 178, 170, 0.2);
}

.theme-toggle-label:hover .theme-icon {
  color: var(--bg-primary) !important;
}

/* Theme icons */
.theme-icon {
  transition: color 0.3s ease;
  flex-shrink: 0;
}

/* Icon display logic only - let base styles handle colors */
.theme-toggle-input:checked + .theme-toggle-label .theme-icon-dark {
  display: block;
}

.theme-toggle-input:checked + .theme-toggle-label .theme-icon-light {
  display: none;
}

.theme-toggle-input:not(:checked) + .theme-toggle-label .theme-icon-dark {
  display: none;
}

.theme-toggle-input:not(:checked) + .theme-toggle-label .theme-icon-light {
  display: block;
}

.left-nav {
  margin-top: auto;
  margin-bottom: auto;
  position: relative;
  z-index: 10;
}

.nav-section {
  margin-bottom: 0;
}

.nav-heading {
  font-family: "Source Code Pro", monospace;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  cursor: pointer;
  padding: 0.5rem 0;
  transition: all 0.2s ease;
  position: relative;
  text-decoration: none !important;
  display: block;
}

.nav-heading:hover {
  color: var(--text-primary);
  font-size: 0.8rem;
}

/* Target-based navigation highlighting */
#about:target ~ * .left-nav a[href="#about"],
#tech-stack:target ~ * .left-nav a[href="#tech-stack"],
#experience:target ~ * .left-nav a[href="#experience"],
#education:target ~ * .left-nav a[href="#education"],
#recommendations:target ~ * .left-nav a[href="#recommendations"],
body:not(:has(:target)) .left-nav a[href="#about"] {
  color: var(--accent-primary) !important;
  font-weight: 700;
}

/* Alternative approach using body-level targeting */
body:has(#about:target) .left-nav a[href="#about"],
body:has(#tech-stack:target) .left-nav a[href="#tech-stack"],
body:has(#experience:target) .left-nav a[href="#experience"],
body:has(#education:target) .left-nav a[href="#education"],
body:has(#recommendations:target) .left-nav a[href="#recommendations"] {
  color: var(--accent-primary) !important;
  font-weight: 700;
}

/* Default active state for About section only when no other target is active */
body:not(:has(:target)) .nav-heading[href="#about"] {
  color: var(--accent-primary);
  font-weight: 700;
}

.email-link {
  text-decoration: underline !important;
}

.terminal-section {
  position: relative;
  background: transparent;
  padding: 0 0 6rem 0;
  margin-bottom: 0;
}

/* Only About section aligns with subtitle when clicked */
#about {
  scroll-margin-top: 10rem;
}

.terminal-section::after {
  content: "";
  display: block;
  height: 3rem;
  width: 100%;
}

.terminal-section:last-child {
  margin-bottom: 6rem;
}

.tech-section,
.experience-section,
.education-section,
.recommendations-section {
  background: transparent;
}

.section-header {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.85rem;
  color: var(--accent-primary);
  margin-bottom: 1.5rem;
  opacity: 1;
  text-transform: none;
  font-weight: 600;
  position: sticky;
  top: -1px;
  z-index: 100;
  padding: 1rem 0;
  margin-top: -1rem;
}

.section-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: -2rem;
  right: -2rem;
  bottom: 0;
  background: var(--bg-primary);
  z-index: -1;
  pointer-events: none;
  user-select: none;
}

h2 {
  font-family: "JetBrains Mono", monospace;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-primary);
  margin-bottom: 2rem;
  text-transform: lowercase;
}

.summary-card {
  background: transparent;
  padding: 0;
  max-width: 100%;
  margin: 0 2rem 0 2rem;
  text-align: left;
  position: relative;
}

.summary-tagline {
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  line-height: 1.5;
  max-width: 90%;
}

.summary-description {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 90%;
  margin: 0;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.ls-output {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  margin: 0 2rem 0 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.ls-item {
  display: grid;
  grid-template-columns: 2fr 0.5fr 1fr 1fr 1fr 1fr 2fr;
  gap: 0.5rem;
  padding: 0.25rem 0;
  color: var(--text-secondary);
  text-decoration: none !important;
  transition: all 0.2s ease;
  border-radius: 3px;
  align-items: center;
}

.ls-item:hover {
  background: rgba(85, 153, 153, 0.1);
  color: var(--text-primary);
  transform: translateX(4px);
}

.ls-item:hover .tool-name {
  color: var(--accent-primary);
}

.ls-item .permissions {
  font-weight: 400;
  opacity: 0.6;
}

.ls-item .links,
.ls-item .size {
  text-align: center;
  font-weight: 400;
}

.ls-item .owner,
.ls-item .group {
  font-weight: 400;
  opacity: 0.7;
  text-align: center;
}

.ls-item .date {
  font-weight: 400;
  opacity: 0.8;
  text-align: center;
}

.ls-item .tool-name {
  font-weight: 500;
  color: var(--text-primary);
}

.ls-truncated {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  color: var(--text-secondary);
  opacity: 0.6;
  margin-top: 0.5rem;
  padding: 0.25rem 0;
  font-style: italic;
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  margin: 0 2rem;
}

.timeline-item {
  background: transparent;
  padding: 1rem;
  margin: 0;
  position: relative;
  border-radius: 0px;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.timeline-item:hover {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
}

.item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.stage-status {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.8rem;
  padding: 0.25rem 0.75rem;
  background: var(--accent-secondary);
  color: var(--bg-primary);
  border-radius: 20px;
  font-weight: 600;
}

.job-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.job-title {
  font-family: "JetBrains Mono", monospace;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  line-height: 1.4;
}

.company {
  color: var(--accent-secondary);
  font-weight: 400;
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.date-range {
  color: var(--text-secondary);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  font-weight: 400;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.7;
}

.job-description {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.7;
  font-size: 0.9rem;
  max-width: 85%;
}

.achievements {
  list-style: none;
  margin-top: 1rem;
}

.achievements li {
  position: relative;
  padding-left: 1rem;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 0.85rem;
}

.achievements li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--accent-primary);
  font-weight: normal;
  opacity: 0.6;
}

.achievements li:last-child {
  margin-bottom: 0;
}

.recommendation {
  background-color: transparent;
  padding: 1.5rem;
  margin: 0 2rem 2.5rem 2rem;
  border-radius: 0px;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.recommendation:hover {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
}

.recommendation-text {
  font-style: italic;
  margin-bottom: 1.5rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

.recommender {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.85rem;
}

.recommender-title {
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 400;
  margin-top: 0.25rem;
}

.interests-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.interest-item {
  background-color: var(--gray-light);
  padding: 0.5rem 1rem;
  border-radius: 2px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.greetings-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.greeting-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem 1rem;
  min-width: 120px;
  transition: all 0.3s ease;
}

.greeting-item:hover {
  border-color: var(--accent-primary);
  transform: translateY(-2px);
}

.greeting {
  font-size: 1.5rem;
  color: var(--accent-primary);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.language {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.personal-links {
  text-align: center;
}

.poetry-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-secondary);
  border: 1px solid var(--accent-tertiary);
  color: var(--accent-tertiary);
  padding: 1rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.poetry-link:hover {
  background: var(--accent-tertiary);
  color: var(--bg-primary);
}

.site-footer {
  margin: 2rem 0 2rem;
  padding: 1rem 0;
  text-align: right;
}

.footer-content {
  font-family: "Source Code Pro", monospace;
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.6;
  opacity: 0.7;
}

@media (max-width: 1024px) {
  .app-layout {
    flex-direction: column;
  }

  .left-pane {
    position: relative;
    width: 100%;
    height: auto;
    padding: 3rem 2rem 2rem;
    margin-bottom: 0;
    overflow: visible;
    max-width: 100vw;
    box-sizing: border-box;
  }

  .right-pane {
    width: 100%;
    margin-left: 0;
    max-width: 100vw;
  }

  .terminal-window {
    margin: 0;
  }

  .terminal-content {
    padding: 2rem 2rem 8rem;
    margin-top: 2rem;
  }

  .section-header {
    position: sticky;
    top: 0;
    background: var(--bg-primary);
    z-index: 100;
    padding: 1rem 0;
    margin-top: 0;
    margin-bottom: 1.5rem;
  }

  .section-header::before {
    content: "";
    position: absolute;
    top: 0;
    left: -2rem;
    right: -2rem;
    bottom: 0;
    background: var(--bg-primary);
    z-index: -1;
  }

  .terminal-section {
    padding-bottom: 6rem;
  }

  .left-nav {
    display: none;
  }

  .profile-header {
    text-align: left;
    margin-bottom: 2rem;
    padding-top: 2rem;
  }

  .contact-links {
    justify-content: flex-start;
    margin-top: 2rem;
    margin-bottom: 3rem;
    padding-bottom: 0;
  }

  .timeline-item:hover,
  .recommendation:hover {
    background: transparent;
    border: 1px solid transparent;
  }

  .nav-heading:hover {
    color: var(--text-secondary);
    font-size: 0.75rem;
  }

  .ls-output {
    font-size: 0.7rem;
    margin: 0 1rem;
  }

  .ls-item {
    grid-template-columns: 1.5fr 0.3fr 0.8fr 0.8fr 0.8fr 0.8fr 1.5fr;
    gap: 0.3rem;
  }

  /* Theme toggle positioning for tablet - increased margins */
  .theme-toggle-label {
    top: 1.75rem;
    right: 1.75rem;
    width: 36px;
    height: 36px;
  }

  /* Tablet button states */
  .theme-toggle-input:checked + .theme-toggle-label {
    background: #111;
    color: #aaa;
    border: 1px solid #333;
  }

  .theme-toggle-input:not(:checked) + .theme-toggle-label {
    background: #f5f5f5;
    color: #666;
    border: 1px solid #ccc;
  }

  .theme-toggle-label:hover {
    background: var(--accent-primary) !important;
    color: var(--bg-primary) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(32, 178, 170, 0.2);
  }

  .theme-toggle-label:hover .theme-icon {
    color: var(--bg-primary) !important;
  }

  .theme-icon {
    width: 18px;
    height: 18px;
  }
}

@media (max-width: 768px) {
  .title {
    font-size: 2rem;
    text-align: left;
  }

  .subtitle {
    font-size: 1.2rem;
    text-align: left;
  }

  .left-pane {
    padding: 2.5rem 1.5rem 1.5rem;
    text-align: left;
  }

  .profile-header {
    text-align: left;
    margin-bottom: 0.5rem;
    padding-top: 1rem;
  }

  .contact-links {
    justify-content: flex-start;
    gap: 1rem;
    margin-top: 1.5rem;
    margin-bottom: 3rem;
    padding-bottom: 0;
  }

  .contact-link {
    width: 36px;
    height: 36px;
  }

  .contact-link svg {
    width: 16px;
    height: 16px;
  }

  .terminal-content {
    padding: 1rem 1.5rem 1rem;
  }

  .site-footer {
    text-align: center;
  }

  .section-header {
    position: sticky;
    top: 0;
    background: var(--bg-primary);
    z-index: 100;
    padding: 1rem 0;
    margin-top: 0;
    margin-bottom: 1.5rem;
  }

  .section-header::before {
    content: "";
    position: absolute;
    top: 0;
    left: -1.5rem;
    right: -1.5rem;
    bottom: 0;
    background: var(--bg-primary);
    z-index: -1;
  }

  .item-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .date-range {
    white-space: normal;
  }

  /* Consistent left/right margins for all content sections */
  .summary-card,
  .ls-output {
    margin-left: 1.5rem;
    margin-right: 1.5rem;
  }

  /* Adjust margins for padded elements to align visually */
  .timeline {
    margin-left: 0.5rem; /* 1.5rem - 1rem padding */
    margin-right: 0.5rem;
  }

  .recommendation {
    margin-left: 0rem; /* 1.5rem - 1.5rem padding */
    margin-right: 0rem;
  }

  /* Theme toggle positioning for mobile - bottom right FAB position, increased margins */
  .theme-toggle-label {
    top: auto;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 56px;
    height: 56px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  }

  /* Mobile button states */
  .theme-toggle-input:checked + .theme-toggle-label {
    background: #111;
    color: #aaa;
    border: 1px solid #333;
  }

  .theme-toggle-input:not(:checked) + .theme-toggle-label {
    background: #f5f5f5;
    color: #666;
    border: 1px solid #ccc;
  }

  /* Mobile tap feedback - brief flash only */
  .theme-toggle-label:active {
    background: #20b2aa !important;
    color: #fff !important;
    transform: scale(0.95);
    box-shadow: 0 2px 8px rgba(32, 178, 170, 0.3);
    transition: none;
  }

  .theme-toggle-label:active .theme-icon {
    color: #fff !important;
  }

  .theme-icon {
    width: 24px;
    height: 24px;
  }
}

/* Hide print elements on screen */
.print-contact-info,
.print-url,
.print-contacts {
  display: none !important;
}

@media print {
  /* Hide theme toggle in print */
  .theme-toggle-input,
  .theme-toggle-label {
    display: none !important;
  }
  /* A4 Page Setup */
  @page {
    size: A4;
    margin: 15mm 10mm 15mm 15mm;
  }

  /* Default B&W Print Styles */
  :root {
    --print-primary: #000;
    --print-secondary: #333;
    --print-accent: #000;
    --print-muted: #666;
  }

  /* Reset to single column mobile-like layout */
  .app-layout {
    display: block;
    width: 100%;
  }

  .left-pane {
    position: static;
    width: 100%;
    height: auto;
    padding: 0;
    border: none;
    page-break-inside: avoid;
  }

  .right-pane {
    width: 100%;
    margin-left: 0;
    max-width: 100%;
  }

  /* Show print contact info - keep URLs on left, move contacts to right */
  .print-contact-info {
    display: block !important;
    visibility: visible !important;
  }

  .print-url {
    margin-bottom: 3pt;
    font-weight: 600;
    color: var(--print-primary) !important;
    display: block !important;
    text-align: left; /* Keep on the left side */
  }

  .print-contacts {
    display: block !important;
    color: var(--print-secondary) !important;
    text-align: right;
    font-size: 8pt;
    line-height: 1.4;
    position: absolute;
    top: 26pt; /* Align with subtitle level */
    right: 0;
  }

  .print-contacts span {
    display: block;
    margin-bottom: 1pt;
    color: var(--print-secondary) !important;
    line-height: 1.2;
  }

  /* Hide screen contact links */
  .contact-links,
  .left-nav,
  .site-footer {
    display: none !important;
  }

  /* Typography for print */
  body {
    font-size: 10pt;
    line-height: 1.4;
    color: var(--print-primary);
    background: white !important;
    font-family: "Source Code Pro", "Consolas", "Monaco", monospace;
  }

  /* Force white background for all print elements */
  * {
    background: white !important;
  }

  .title {
    font-size: 22pt;
    font-weight: bold;
    color: var(--print-primary);
    margin-bottom: 2pt;
    text-align: left;
  }

  .subtitle {
    font-size: 14pt;
    color: var(--print-accent);
    margin-bottom: 6pt;
    text-align: left;
  }

  .profile-header {
    position: relative;
    margin-bottom: 12pt;
    page-break-after: avoid;
  }

  /* Keep left side content in normal flow */
  .title,
  .subtitle,
  .print-url {
    /* Normal positioning - no changes */
  }

  /* Terminal content */
  .terminal-content {
    padding: 0;
  }

  /* Replace command headers with friendly labels */
  .section-header {
    font-size: 12pt;
    font-weight: bold;
    color: var(--print-accent);
    margin: 16pt 0 8pt 0;
    padding: 0;
    position: static;
    page-break-after: avoid;
    border-bottom: 1pt solid var(--print-accent);
    padding-bottom: 2pt;
  }

  .section-header::before {
    display: none;
  }

  /* Replace command text with friendly labels */
  #about .section-header::after {
    content: "About";
  }
  #tech-stack .section-header::after {
    content: "Technical Skills";
  }
  #experience .section-header::after {
    content: "Experience";
  }
  #education .section-header::after {
    content: "Education";
  }
  #recommendations .section-header::after {
    content: "Recommendations";
  }

  .section-header {
    font-size: 0; /* Hide original command text */
  }

  .section-header::after {
    font-size: 12pt;
    display: block;
  }

  /* Section spacing */
  .terminal-section {
    margin-bottom: 12pt;
    padding: 0;
    page-break-inside: auto;
  }

  .terminal-section::after {
    display: none;
  }

  /* Content styling */
  .summary-card {
    margin: 0;
    page-break-inside: avoid;
  }

  .summary-tagline {
    font-size: 11pt;
    font-weight: 600;
    margin-bottom: 6pt;
    color: var(--print-primary);
  }

  .summary-description {
    font-size: 10pt;
    color: var(--print-secondary);
    line-height: 1.4;
  }

  /* Technical skills */
  .ls-output {
    margin: 0;
    display: block;
  }

  .ls-item {
    display: inline-block;
    margin: 0 8pt 4pt 0;
    color: var(--print-primary);
    background: #f5f5f5;
    padding: 2pt 4pt;
    border-radius: 2pt;
    font-size: 9pt;
    page-break-inside: avoid;
    border: 0.5pt solid var(--print-accent);
  }

  .ls-item .tool-name {
    font-weight: 600;
    color: var(--print-secondary);
  }

  .ls-item .permissions,
  .ls-item .links,
  .ls-item .size,
  .ls-item .owner,
  .ls-item .group,
  .ls-item .date {
    display: none;
  }

  .ls-truncated {
    display: none !important;
  }

  /* Timeline items */
  .timeline {
    margin-left: 0;
  }

  .timeline-item {
    margin-bottom: 12pt;
    padding: 0;
    page-break-inside: avoid;
    border: none;
    background: transparent;
  }

  .job-title {
    font-size: 11pt;
    font-weight: bold;
    color: var(--print-primary);
    margin-bottom: 2pt;
  }

  .company {
    font-size: 10pt;
    color: var(--print-accent);
    margin-bottom: 2pt;
  }

  .date-range {
    font-size: 9pt;
    color: var(--print-muted);
    margin-bottom: 4pt;
  }

  .job-description {
    font-size: 10pt;
    color: var(--print-secondary);
    margin-bottom: 6pt;
    line-height: 1.4;
    max-width: 100%;
  }

  .achievements {
    margin-top: 6pt;
  }

  .achievements li {
    font-size: 9pt;
    color: var(--print-secondary);
    margin-bottom: 2pt;
    line-height: 1.3;
  }

  /* Recommendations */
  .recommendation {
    margin: 0 0 16pt 0;
    padding: 6pt 8pt;
    page-break-inside: avoid;
    border: 0.5pt solid var(--print-accent) !important;
    border-radius: 2pt;
    background: white !important;
  }

  .recommendation-text {
    font-size: 10pt;
    color: var(--print-secondary);
    font-style: italic;
    margin-bottom: 4pt;
    line-height: 1.4;
  }

  .recommender {
    font-size: 10pt;
    font-weight: bold;
    color: var(--print-primary);
  }

  .recommender-title {
    font-size: 9pt;
    color: var(--print-muted);
    margin-top: 1pt;
  }

  /* Page break control - refined strategy */
  .profile-header,
  .timeline-item,
  .recommendation {
    page-break-inside: avoid;
  }

  .item-header,
  .section-header {
    page-break-after: avoid;
    page-break-inside: avoid;
    page-break-before: auto;
    margin-top: 20pt; /* Extra space when section starts new page */
  }

  .section-header:first-of-type {
    margin-top: 16pt; /* Normal spacing for first section */
  }
}

/* Color Print Support */
@media print and (color) {
  :root {
    --print-primary: #000;
    --print-secondary: #333;
    --print-accent: #20b2aa; /* Our beautiful cyan accent */
    --print-muted: #666;
  }
}
