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

/* Typography */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: #000;
  background: #fff;
}

/* Background Image */
.background-image {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background-image: url('/background-image.jpeg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

@media print {
  .background-image {
    display: none;
  }
}

/* Homepage Styles */
body.homepage {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease;
}

[data-theme="dark"] body.homepage {
  background: #0f172a;
}

body.homepage .content {
  max-width: 800px;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-radius: 12px;
  margin: 2rem;
  margin-top: 4rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  position: relative;
  transition: background-color 0.3s ease;
}

[data-theme="dark"] body.homepage .content {
  background: rgba(30, 41, 59, 0.9);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  color: #e2e8f0;
}

[data-theme="dark"] body.homepage .about p {
  color: #e2e8f0;
}

[data-theme="dark"] body.homepage .about a {
  color: #60a5fa;
}

[data-theme="dark"] body.homepage .about a:hover {
  color: #93c5fd;
  border-bottom-color: rgba(147, 197, 253, 0.5);
}

body.homepage .about {
  width: 100%;
}

body.homepage p {
  font-size: 16px;
  line-height: 24px;
  margin-bottom: 22px;
  -webkit-font-smoothing: antialiased;
}

body.homepage a {
  color: #000;
  font-weight: bold;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  transition: all 0.2s;
}

body.homepage a:hover {
  color: #990000;
  border-bottom: 1px solid rgba(255, 255, 255, 1);
}

/* Resume Page Styles */
body.resume-page {
  background: #fff;
  transition: background-color 0.3s ease;
}

/* Dark Mode Variables */
[data-theme="dark"] body.resume-page {
  background: #0f172a;
  color: #e2e8f0;
}

.resume-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem;
  background: #fff;
  transition: background-color 0.3s ease, color 0.3s ease;
}

[data-theme="dark"] .resume-container {
  background: #1e293b;
  color: #e2e8f0;
}

/* Theme Toggle Button */
.theme-toggle {
  background: transparent;
  border: none;
  border-radius: 0.375rem;
  padding: 0.375rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  color: #6b7280;
  line-height: 0;
}

.theme-toggle:hover {
  color: #2563eb;
  background: rgba(37, 99, 235, 0.1);
}

[data-theme="dark"] .theme-toggle {
  color: #94a3b8;
}

[data-theme="dark"] .theme-toggle:hover {
  color: #60a5fa;
  background: rgba(96, 165, 250, 0.1);
}

.theme-toggle-wrapper {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 10;
}

/* For homepage, videos, certs */
body.homepage .theme-toggle-wrapper {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
}

body.videos-page .theme-toggle-wrapper,
body.certs-page .theme-toggle-wrapper {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
}

.theme-toggle-wrapper .theme-toggle {
  border: 2px solid #e5e7eb;
  padding: 0.5rem;
}

[data-theme="dark"] .theme-toggle-wrapper .theme-toggle {
  border-color: #475569;
}

.theme-toggle-wrapper .theme-toggle:hover {
  border-color: #2563eb;
}

[data-theme="dark"] .theme-toggle-wrapper .theme-toggle:hover {
  border-color: #60a5fa;
}

.theme-icon-dark {
  display: none;
}

[data-theme="dark"] .theme-icon-light {
  display: none;
}

[data-theme="dark"] .theme-icon-dark {
  display: block;
}

/* Header Styles */
.resume-header {
  border-bottom: 3px solid #e5e7eb;
  padding-bottom: 2rem;
  margin-bottom: 3rem;
  transition: border-color 0.3s ease;
}

[data-theme="dark"] .resume-header {
  border-bottom-color: #334155;
}

.resume-header-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 2rem;
}

.resume-header .name h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
  color: #111827;
  letter-spacing: -0.02em;
  transition: color 0.3s ease;
}

[data-theme="dark"] .resume-header .name h1 {
  color: #f1f5f9;
}

.resume-header .name h1 a {
  color: inherit;
  text-decoration: none;
}

.resume-header .name .title {
  font-size: 1.25rem;
  color: #6b7280;
  margin: 0;
  font-weight: 400;
  transition: color 0.3s ease;
}

[data-theme="dark"] .resume-header .name .title {
  color: #94a3b8;
}

.resume-header .contact-info {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.resume-header .contact-info a {
  color: #2563eb;
  text-decoration: none;
  font-size: 0.95rem;
}

.resume-header .contact-info a:hover {
  text-decoration: underline;
}

.resume-header .contact-info span {
  color: #6b7280;
  font-size: 0.95rem;
  transition: color 0.3s ease;
}

[data-theme="dark"] .resume-header .contact-info span {
  color: #94a3b8;
}

.resume-header .social-links {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  justify-content: flex-end;
  align-items: center;
}

.resume-header .social-links .theme-toggle {
  margin-right: 0.25rem;
}

.resume-header .social-links a {
  color: #6b7280;
  transition: color 0.2s;
  display: flex;
  align-items: center;
}

.resume-header .social-links a:hover {
  color: #2563eb;
}

[data-theme="dark"] .resume-header .social-links a {
  color: #94a3b8;
}

[data-theme="dark"] .resume-header .social-links a:hover {
  color: #60a5fa;
}

/* Content Layout */
.resume-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 4rem;
  margin-top: 2rem;
}

.resume-main {
  min-width: 0;
}

/* Section Titles */
.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
  margin: 0 0 2rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #e5e7eb;
  transition: color 0.3s ease, border-color 0.3s ease;
}

[data-theme="dark"] .section-title {
  color: #f1f5f9;
  border-bottom-color: #334155;
}

/* Job Entries */
.job-entry {
  margin-bottom: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid #e5e7eb;
  transition: border-color 0.3s ease;
}

[data-theme="dark"] .job-entry {
  border-bottom-color: #334155;
}

.job-entry:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

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

.job-title-company {
  flex: 1;
}

.job-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #111827;
  margin: 0 0 0.25rem 0;
  transition: color 0.3s ease;
}

[data-theme="dark"] .job-title {
  color: #f1f5f9;
}

.company-name {
  font-size: 1rem;
  font-weight: 500;
  color: #2563eb;
  margin: 0;
  transition: color 0.3s ease;
}

[data-theme="dark"] .company-name {
  color: #60a5fa;
}

.company-name a {
  color: inherit;
  text-decoration: none;
}

.company-name a:hover {
  text-decoration: underline;
}

.job-dates {
  font-size: 0.875rem;
  color: #6b7280;
  white-space: nowrap;
  font-weight: 500;
  transition: color 0.3s ease;
}

[data-theme="dark"] .job-dates {
  color: #94a3b8;
}

.job-duties {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}

.job-duties li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
  line-height: 1.6;
  color: #374151;
  font-size: 0.95rem;
  transition: color 0.3s ease;
}

[data-theme="dark"] .job-duties li {
  color: #cbd5e1;
}

.job-duties li:before {
  content: "▹";
  position: absolute;
  left: 0;
  color: #2563eb;
  font-weight: bold;
  transition: color 0.3s ease;
}

[data-theme="dark"] .job-duties li:before {
  color: #60a5fa;
}

.job-duties li a {
  color: #2563eb;
  text-decoration: none;
  transition: color 0.3s ease;
}

[data-theme="dark"] .job-duties li a {
  color: #60a5fa;
}

.job-duties li a:hover {
  text-decoration: underline;
}

.job-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.tech-tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: #f3f4f6;
  color: #374151;
  border-radius: 0.375rem;
  font-size: 0.8125rem;
  font-weight: 500;
  transition: background-color 0.3s ease, color 0.3s ease;
}

[data-theme="dark"] .tech-tag {
  background: #334155;
  color: #cbd5e1;
}

/* Sidebar */
.resume-sidebar {
  min-width: 0;
}

.sidebar-section {
  margin-bottom: 2.5rem;
}

.sidebar-section:last-child {
  margin-bottom: 0;
}

.sidebar-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #111827;
  margin: 0 0 1rem 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: color 0.3s ease;
}

[data-theme="dark"] .sidebar-title {
  color: #f1f5f9;
}

.sidebar-section p {
  color: #6b7280;
  line-height: 1.7;
  font-size: 0.9375rem;
  margin: 0 0 1rem 0;
  transition: color 0.3s ease;
}

[data-theme="dark"] .sidebar-section p {
  color: #94a3b8;
}

.skills-list,
.projects-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.skills-list li,
.projects-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid #f3f4f6;
  color: #374151;
  font-size: 0.9375rem;
  line-height: 1.6;
  transition: border-color 0.3s ease, color 0.3s ease;
}

[data-theme="dark"] .skills-list li,
[data-theme="dark"] .projects-list li {
  border-bottom-color: #334155;
  color: #cbd5e1;
}

.skills-list li:last-child,
.projects-list li:last-child {
  border-bottom: none;
}

.projects-list a {
  color: #2563eb;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

[data-theme="dark"] .projects-list a {
  color: #60a5fa;
}

.projects-list a:hover {
  text-decoration: underline;
}

.education-item {
  color: #374151;
  font-size: 0.9375rem;
  line-height: 1.7;
  transition: color 0.3s ease;
}

[data-theme="dark"] .education-item {
  color: #cbd5e1;
}

.education-item strong {
  color: #111827;
  display: block;
  margin-bottom: 0.25rem;
  transition: color 0.3s ease;
}

[data-theme="dark"] .education-item strong {
  color: #f1f5f9;
}

.education-item em {
  color: #6b7280;
  font-style: normal;
  transition: color 0.3s ease;
}

[data-theme="dark"] .education-item em {
  color: #94a3b8;
}

.education-item time {
  color: #6b7280;
  font-size: 0.875rem;
  transition: color 0.3s ease;
}

[data-theme="dark"] .education-item time {
  color: #94a3b8;
}

/* Videos and Certs Pages */
body.videos-page,
body.certs-page {
  min-height: 100vh;
  transition: background-color 0.3s ease;
}

[data-theme="dark"] body.videos-page,
[data-theme="dark"] body.certs-page {
  background: #0f172a;
}

body.videos-page .content,
body.certs-page .content {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  min-height: calc(100vh - 4rem);
  margin-top: 2rem;
  margin-bottom: 2rem;
  transition: background-color 0.3s ease, color 0.3s ease;
}

[data-theme="dark"] body.videos-page .content,
[data-theme="dark"] body.certs-page .content {
  background: rgba(30, 41, 59, 0.9);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  color: #e2e8f0;
}

.page-content {
  width: 100%;
}

.page-content h1 {
  font-size: 36px;
  margin-bottom: 2rem;
  color: #555;
  transition: color 0.3s ease;
}

[data-theme="dark"] .page-content h1 {
  color: #f1f5f9;
}

.page-content h2 {
  font-size: 24px;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: #555;
  transition: color 0.3s ease;
}

[data-theme="dark"] .page-content h2 {
  color: #e2e8f0;
}

.page-content ul {
  list-style: none;
  margin-bottom: 1.5rem;
}

.page-content ul li {
  margin-bottom: 0.75rem;
  transition: color 0.3s ease;
}

[data-theme="dark"] .page-content ul li {
  color: #cbd5e1;
}

.page-content a {
  color: #34beee;
  text-decoration: none;
  transition: color 0.3s ease;
}

[data-theme="dark"] .page-content a {
  color: #60a5fa;
}

.page-content a:hover {
  text-decoration: underline;
}

.page-content p {
  transition: color 0.3s ease;
}

[data-theme="dark"] .page-content p {
  color: #cbd5e1;
}

.video-list {
  list-style: none;
}

/* Print Styles for Resume */
@media print {
  body.resume-page {
    background: #fff;
  }

  .theme-toggle {
    display: none;
  }

  .background-image {
    display: none;
  }

  .resume-container {
    max-width: 100%;
    padding: 0;
    background: #fff;
  }

  .resume-header {
    border-bottom: 2px solid #000;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    page-break-inside: avoid;
  }

  .resume-content {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .resume-main {
    border-right: none;
    padding-right: 0;
  }

  .resume-sidebar {
    padding-left: 0;
    margin-top: 2rem;
  }

  .job-entry {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .job-entry.pagebreak {
    page-break-before: always;
  }

  .social-links {
    display: none;
  }

  .tech-tag {
    background: #e5e7eb;
    border: 1px solid #d1d5db;
  }

  a {
    color: #000;
    text-decoration: underline;
  }

  a[href^="http"]:after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #666;
  }

  @page {
    margin: 1in;
  }
}

/* Responsive Design */
@media (max-width: 968px) {
  .resume-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .resume-main {
    border-right: none;
    padding-right: 0;
    border-bottom: 1px solid #dadada;
    padding-bottom: 2rem;
  }

  .resume-sidebar {
    padding-left: 0;
  }

  .resume-header-content {
    flex-direction: column;
  }

  .contact-info h2 {
    text-align: left;
  }

  .name h1 {
    font-size: 36px;
  }
}

@media (max-width: 640px) {
  body.homepage .content {
    margin: 1rem;
    margin-top: 3.5rem;
    padding: 1.5rem;
  }

  body.homepage .theme-toggle-wrapper {
    top: 0.5rem;
    right: 0.5rem;
  }

  body.videos-page .content,
  body.certs-page .content {
    margin: 1rem;
    padding: 1.5rem;
  }

  body.videos-page .theme-toggle-wrapper,
  body.certs-page .theme-toggle-wrapper {
    top: 0.5rem;
    right: 0.5rem;
  }

  .resume-container {
    padding: 2rem 1rem;
  }


  .resume-header .name h1 {
    font-size: 2rem;
  }

  .section-title {
    font-size: 1.25rem;
  }

  .job-title {
    font-size: 1.125rem;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .background-image {
    background-attachment: scroll;
  }
}

