/* Resume Specific Styles */
body {
  overflow-y: auto !important;
  height: auto !important;
  min-height: 100vh;
  font-family: var(--font-body);
  color: #d1d1d1;
}

.resume-container {
  max-width: 800px; /* Reduced width for better reading line length */
  margin: 0 auto;
  padding: 3rem 1.5rem;
  position: relative;
  z-index: 10;
}

.resume-header {
  text-align: center;
  margin-bottom: 3rem;
}

.resume-header h1 {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 2rem; /* Further Reduced */
  background: linear-gradient(
    90deg,
    var(--gold-primary) 0%,
    var(--gold-light) 50%,
    var(--gold-secondary) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.2rem;
  letter-spacing: -0.02em;
}

.resume-role {
  font-size: 0.9rem; /* Further Reduced */
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
  margin-bottom: 1rem;
}

.resume-contact {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.resume-contact a {
  color: inherit;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: color 0.2s;
}

.resume-contact a:hover {
  color: var(--gold-primary);
}

.resume-summary {
  font-size: 0.85rem; /* Further Reduced */
  line-height: 1.5;
  color: #ccc;
  max-width: 600px;
  margin: 0 auto 1.5rem auto;
  text-align: center;
}

.resume-actions {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  margin-bottom: 2rem;
}

.btn-gold {
  font-family: var(--font-body);
  font-size: 0.75rem; /* Compact buttons */
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--gold-primary);
  border: 1px solid var(--gold-primary);
  padding: 0.5rem 1.2rem;
  text-decoration: none;
  transition: all 0.3s ease;
  text-transform: uppercase;
  background: rgba(212, 175, 55, 0.05);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border-radius: 2px;
}

.btn-gold:hover {
  background: var(--gold-primary);
  color: #000;
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.2);
}

/* Timeline Layout */
.timeline-section {
  position: relative;
  padding-left: 2rem; /* 32px space */
  margin-bottom: 2rem;
}

/* Vertical Line */
.timeline-section::before {
  content: "";
  position: absolute;
  left: 7px; /* Line center at 7.5px */
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(255, 255, 255, 0.1);
}

.section-title {
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--text-white);
  font-size: 1rem;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.section-title i {
  color: var(--gold-primary);
  font-size: 0.9rem;
  background: #0a0a0a;
  padding: 5px;
  border: 1px solid var(--border-subtle);
  border-radius: 50%;
  z-index: 2;
  width: 24px;
  height: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.timeline-item {
  position: relative;
  margin-bottom: 1.8rem;
}

.timeline-item::after {
  /* Timeline Dot */
  content: "";
  position: absolute;
  left: -25px; /* 32px (padding) - 25px = 7px (matches line left) */
  top: 0.4rem; /* Aligns with text nicely */
  width: 8px; /* Center at 7px + 4px = 11px? No. */
  /* Line is 1px at left 7px. Center 7.5px.
       Dot is 8px. To center at 7.5px, left should be 7.5 - 4 = 3.5px.
       3.5px relative to 32px padding is 3.5 - 32 = -28.5px.
       Let's try -28.5px.
    */
  left: -28.5px;
  height: 8px;
  border-radius: 50%;
  background: #0a0a0a;
  border: 1px solid var(--gold-secondary);
  z-index: 1;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.2rem;
}

.timeline-title {
  font-size: 0.95rem;
  color: var(--gold-light);
  font-weight: 600;
}

.timeline-period {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 400;
}

.timeline-subtitle {
  font-size: 0.85rem;
  color: var(--text-white);
  margin-bottom: 0.4rem;
  font-weight: 500;
}

.timeline-content {
  font-size: 0.8rem; /* Target small size */
  line-height: 1.5;
  color: #aaa;
}

.timeline-content ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.timeline-content li {
  position: relative;
  padding-left: 1rem;
  margin-bottom: 0.3rem;
}

.timeline-content li::before {
  content: "-";
  position: absolute;
  left: 0;
  color: var(--gold-secondary);
}

/* Skills Grid - Compact */
.skills-compact {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-left: -2rem; /* No timeline line needed here essentially, or outside it */
  padding-left: 2rem;
}

.skill-pill {
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  color: #ddd;
}

.highlights-row {
  display: flex;
  gap: 1rem;
  margin-left: -2rem;
  padding-left: 2rem;
  margin-bottom: 2rem;
}

.highlight-mini {
  flex: 1;
  background: rgba(255, 255, 255, 0.02);
  padding: 0.8rem;
  border-radius: 4px;
  border-top: 2px solid var(--gold-secondary);
}

.highlight-mini h4 {
  font-size: 0.8rem;
  color: var(--gold-light);
  margin-bottom: 0.3rem;
}

.highlight-mini p {
  font-size: 0.75rem;
  color: #999;
  line-height: 1.4;
  margin: 0;
}

@media (max-width: 600px) {
  .resume-container {
    padding: 2rem 2rem 8rem 2rem;
  }
  .highlights-row {
    flex-direction: column;
    gap: 0.5rem;
  }
  .timeline-section {
    padding-left: 1.5rem;
  }
  .section-title {
    margin-left: -1.5rem;
  }
  .timeline-item::after {
    left: -1.55rem;
  }
}

/* Projects Grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 1rem;
  margin-left: -2rem;
  padding-left: 2rem;
  margin-bottom: 2rem;
}

.project-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 0.8rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition:
    transform 0.2s,
    background 0.2s;
}

.project-card:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--gold-primary);
}

.project-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  margin-bottom: 0.5rem;
  object-fit: contain;
  background: #000;
}

.project-name {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-white);
  margin-bottom: 0.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.project-links {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
}

.project-link {
  color: #888;
  font-size: 1rem;
  transition: all 0.2s;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-decoration: none; /* Removed underline */
}

.project-link:hover {
  color: var(--text-white);
  background: var(--gold-primary);
  border-color: var(--gold-primary);
  color: #000;
  transform: translateY(-2px);
}

.fa-apple {
  font-size: 1.2rem;
  margin-bottom: 2px;
}
.fa-google-play {
  font-size: 0.9rem;
}

/* Achievements */
.achievement-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 1.2rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
  transition: all 0.3s;
  margin-left: 0;
}

.achievement-card:hover {
  border-color: var(--gold-primary);
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-2px);
}

.achievement-icon {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  object-fit: contain;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.achievement-info {
  flex: 1;
}

.achievement-title {
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--text-white);
  margin-bottom: 0.2rem;
  font-size: 1rem;
}

.achievement-subtitle {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 0.4rem;
}

.achievement-link {
  color: var(--gold-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
}

.achievement-link:hover {
  color: var(--gold-primary);
  text-decoration: underline;
}

.status-badge {
  font-size: 0.6rem;
  color: rgba(230, 184, 0, 0.6); /* Dimmer gold */
  border: 1px solid rgba(230, 184, 0, 0.15);
  background: transparent;
  border-radius: 4px;
  padding: 1px 5px;
  margin-left: 0.5rem;
  text-transform: uppercase;
  vertical-align: middle;
  font-weight: 400;
  letter-spacing: 0.05em;
  display: inline-block;
}

.section-group {
  page-break-inside: avoid;
}

@media print {
  @page {
    size: A4;
    margin: 0; /* Hide browser headers/footers */
  }

  body {
    padding: 0 !important;
    margin: 0 !important;
    background: #fff !important;
    color: #000 !important;
    overflow: visible !important;
    height: auto !important;
  }

  /* Table Wrapper for Print Margins */
  .print-layout {
    display: table !important;
    width: 100% !important;
    border-collapse: collapse;
  }
  .print-layout thead,
  .print-layout tfoot {
    display: table-header-group !important;
  }
  .print-layout tbody {
    display: table-row-group !important;
  }
  .print-layout tr {
    display: table-row !important;
  }
  .print-layout td {
    display: table-cell !important;
    padding: 0 1.5cm !important; /* Side Margins */
  }

  .print-spacer {
    height: 1.5cm !important;
    border: none !important;
  }
  tfoot .print-spacer {
    height: 2.5cm !important;
  }

  .resume-container {
    padding: 0 !important;
    max-width: none !important;
    margin: 0 !important;
  }

  /* Hide UI elements */
  .resume-actions,
  .grain-overlay,
  #cursor-dot,
  #cursor-outline,
  .glow-orb {
    display: none !important;
  }

  /* Adjust typography */
  h2,
  h3,
  h4,
  .resume-role,
  .section-title {
    color: #000 !important;
    -webkit-text-fill-color: initial !important;
    background: none !important;
    text-shadow: none !important;
  }

  /* Blue Theme Replacements */
  h1, .section-title {
    color: #0056b3 !important;
    -webkit-text-fill-color: initial !important;
    background: none !important;
    text-shadow: none !important;
  }
  
  .timeline-title {
      color: #000 !important;
  }

  .timeline-content li::before {
    color: #0056b3 !important;
  }

  .highlight-mini {
      border-top-color: #0056b3 !important;
  }

  .resume-summary {
    color: #333 !important;
  }
  .timeline-subtitle {
    color: #444 !important;
  }
  .timeline-content {
    color: #222 !important;
  }
  .project-name {
    color: #000 !important;
  }
  .timeline-period {
    color: #666 !important;
  }

  /* Adjust Timeline */
  .timeline-section::before {
    background: #ccc !important;
  }
  .timeline-item::after {
    background: #fff !important;
    border-color: #0056b3 !important;
    width: 8px !important; /* Slightly larger for print visibility */
    height: 8px !important;
    left: -28.5px !important; 
    top: 0.25rem !important; /* Moved up to align better with text */
  }

  /* Layouts */
  .projects-grid {
    gap: 0.5rem !important;
    margin-left: 0 !important;
    padding-left: 0 !important;
    grid-template-columns: repeat(4, 1fr) !important;
  }
  .project-card,
  .achievement-card {
    border: 1px solid #ddd !important;
    background: none !important;
    color: #000 !important;
    page-break-inside: avoid;
    box-shadow: none !important;
  }
  .skill-pill, .project-icon {
    color: #000 !important;
    border-color: #ccc !important;
    background: none !important;
  }

  /* Links */
  a {
    text-decoration: none !important;
    color: #000 !important;
  }
  .fa-external-link-alt {
    display: none !important;
  }

    .project-link {
        display: inline-flex !important;
        border: 1px solid #ccc !important;
        color: #666 !important;
        border-radius: 50% !important;
        background: transparent !important;
    }

    /* Fix labels and titles for print */
    .achievement-title {
        color: #000 !important;
        font-weight: 700 !important;
    }
    
    .status-badge {
        color: #888 !important; /* Lighter/Less highlighted */
        border: none !important;
        background: transparent !important;
        opacity: 1 !important;
        font-weight: 400 !important;
        padding-left: 0 !important; /* Adjust if needed since border is gone */
        box-shadow: none !important;
        text-shadow: none !important;
    }

    .timeline-subtitle span {
        color: #444 !important; /* Override inline styles for percentage */
    }

    .achievement-subtitle span {
        color: #666 !important;
        opacity: 1 !important;
        font-weight: 500 !important;
    }

    .achievement-link {
        color: #555 !important; /* Less eye-catchy than title */
        font-weight: 400 !important;
        text-decoration: none !important; /* Optional: keep clean */
    }
    .achievement-link i {
        display: none !important; /* Optional: hide icon if overly visual, but user didn't ask explicitly. keeping simpler. */
    }

  .resume-header {
      border-bottom: none !important;
      padding-bottom: 0.5rem;
      margin-bottom: 0.5rem;
  }

  /* Professional Name typography */
  h1 {
      color: #003366 !important; /* Dark Navy */
      font-size: 2.2rem !important;
      letter-spacing: 0.05em !important;
      margin-bottom: 0.5rem !important;
  }

  /* Divider Lines for Sections */
  .section-title {
      color: #003366 !important;
      border-bottom: 1px solid #f0f0f0; /* The professional divider */
      padding-bottom: 0.5rem;
      margin-bottom: 1.5rem;
      width: 100%;
  }

  .section-title i {
      /* Remove circle for cleaner professional look */
      color: #003366 !important; /* Professional Navy */
      border: none !important;
      background: none !important;
      width: auto !important;
      height: auto !important;
      font-size: 1.1rem !important;
      margin-right: 0.5rem !important;
      margin-top: -2px !important; /* Optical adjust */
      display: inline-block !important;
      padding: 0 !important;
  }
  
  .resume-contact a {
      color: #004494 !important; /* Dark blue for links */
      font-weight: 500 !important;
  }

  /* Page Breaks */
  /* Page Breaks */
  .timeline-item,
  .achievement-card,
  .section-title,
  .project-card,
  .highlight-mini,
  .skills-compact {
    page-break-inside: avoid;
  }

  h3,
  .section-title {
    page-break-after: avoid;
  }
}

/* Screen styles: Make table transparent */
.print-layout,
.print-layout tbody,
.print-layout tr,
.print-layout td {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: none;
}
.print-layout thead,
.print-layout tfoot {
  display: none;
}
