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

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  color: #1f2937;
  background-color: #f5f5f3;
  transition: all 0.3s ease;
}

body.dark {
  background-color: #0e0e11;
  color: #e5e5e5;
}

.site-title,
.profile-name,
.section-title,
.welcome-title,
.timeline-title {
  font-family: 'DM Mono', monospace;
}

/* Navigation */
.navbar {
  border-bottom: 1px solid #e5e7eb;
  background-color: #f6f6f6;
  position: sticky;
  top: 0;
  z-index: 50;
  transition: all 0.3s ease;
}

body.dark .navbar {
  border-bottom-color: #27272a;
  background-color: #111111;
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

.nav-content {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 64px;
}

.nav-brand {
  display: flex;
  justify-content: flex-start;
}

.site-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #1f2937;
  text-decoration: none;
  transition: color 0.3s ease;
}

body.dark .site-title {
  color: white;
}

.nav-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
}

.nav-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.nav-link {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  color: #4b5563;
  text-decoration: none;
  text-transform: capitalize;
  transition: color 0.3s ease;
  scroll-behavior: smooth;
}

.nav-link:hover {
  color: #111827;
}

body.dark .nav-link {
  color: #9ca3af;
}

body.dark .nav-link:hover {
  color: #f3f4f6;
}

.theme-toggle-floating {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background-color: white;
  border: 1px solid #e5e7eb;
  color: rgb(71, 71, 71);
  cursor: pointer;
  padding: 0.75rem;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.dark .theme-toggle-floating {
  background-color: #1e1e1e;
  border-color: #27272a;
  color: white;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
}

.theme-toggle-floating:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Language Pill Switcher */
.language-pill {
  display: inline-flex;
  align-items: center;
  background-color: #e5e7eb;
  border-radius: 9999px;
  padding: 0.25rem;
}

body.dark .language-pill {
  background-color: #2a2a2f;
}

.lang-btn {
  background: transparent;
  border: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: #6b7280;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.3s ease;
}

body.dark .lang-btn {
  color: #9ca3af;
}

.lang-btn:hover {
  color: #1f2937;
}

body.dark .lang-btn:hover {
  color: white;
}

.lang-btn.active-lang {
  background-color: white;
  color: #1f2937;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

body.dark .lang-btn.active-lang {
  background-color: #3f3f46;
  color: white;
}

/* Main Content */
.main-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.content-wrapper {
  display: flex;
  gap: 4rem;
}

/* Sidebar */
.sidebar {
  width: 260px;
  flex-shrink: 0;
  position: sticky;
  top: 6rem;
  height: fit-content;
  border-right: 1px solid #e8e8e4;
  padding-right: 2rem;
}

body.dark .sidebar {
  border-right-color: #27272a;
}

.sidebar-content {
  padding: 0;
}

.profile-image {
  text-align: center;
  margin-bottom: 20px;
}

.avatar-img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent-color);
}

.profile-info {
  text-align: center;
  margin-bottom: 20px;
}

.profile-name {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: rgb(71, 71, 71);
  transition: color 0.3s ease;
}

body.dark .profile-name {
  color: white;
}

.profile-bio {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #6b7280;
  transition: color 0.3s ease;
}

body.dark .profile-bio {
  color: #9ca3af;
}

.sidebar-subheader {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #9ca3af;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.social-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: rgb(71, 71, 71);
  transition: color 0.3s ease;
}

body.dark .social-link {
  color: white;
}

.social-icon {
  width: 16px;
  height: 16px;
  color: rgb(71, 71, 71);
  transition: color 0.3s ease;
}

body.dark .social-icon {
  color: white;
}

.social-badge {
  background-color: #9ca3af;
  width: 16px;
  height: 16px;
  border-radius: 2px;
}

.social-badge.green {
  background-color: #10b981;
  border-radius: 50%;
}

.social-badge.orange {
  background-color: #f59e0b;
}

.social-badge.blue {
  background-color: #3b82f6;
}

/* Main Content */
.main-content {
  flex: 1;
  min-width: 0;
  /* Solves flexbox overflow issue */
}

.sections {
  display: flex;
  flex-direction: column;
  gap: 4rem;
}

.section {
  scroll-margin-top: 6rem;
}

.section-title {
  font-size: 1.875rem;
  font-weight: 700;
  margin-bottom: 2rem;
  color: #1f2937;
  transition: color 0.3s ease;
}

body.dark .section-title {
  color: white;
}

.welcome-title {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 2rem;
  color: #1f2937;
  transition: color 0.3s ease;
}

body.dark .welcome-title {
  color: white;
}

.content-paragraph {
  color: #6b7280;
  margin-bottom: 1rem;
  font-size: 1.125rem;
  transition: color 0.3s ease;
}

body.dark .content-paragraph {
  color: rgb(200, 200, 200);
}

/* Education & Experience */
.timeline-item {
  border-left: 4px solid;
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.timeline-item.blue,
.timeline-item.green {
  border-left-color: #3b82f6;
}

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

.timeline-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1f2937;
  transition: color 0.3s ease;
}

body.dark .timeline-title {
  color: white;
}

.timeline-date {
  font-size: 0.875rem;
  color: #6b7280;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

body.dark .timeline-date {
  color: rgb(160, 160, 160);
}

.timeline-company,
.timeline-company.green {
  color: #3b82f6;
}

body.dark .timeline-company,
body.dark .timeline-company.green {
  color: rgb(100, 200, 255);
}

.timeline-description {
  color: #6b7280;
  transition: color 0.3s ease;
}

body.dark .timeline-description {
  color: rgb(200, 200, 200);
}

/* Minimal Row Layouts (Experience, Education) */
.minimal-row {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 3rem;
  align-items: flex-start;
}

.minimal-logo-box {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1.25rem;
  color: #ef4444;
  /* Example red text for light */
  background-color: transparent;
  transition: border-color 0.3s ease;
}

body.dark .minimal-logo-box {
  border-color: #27272a;
  color: #f87171;
}

.minimal-content {
  flex: 1;
}

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

.minimal-title {
  font-family: 'Inter', sans-serif;
  font-size: 1.125rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 0.25rem;
}

body.dark .minimal-title {
  color: white;
}

.minimal-subtitle {
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 1rem;
}

body.dark .minimal-subtitle {
  color: #9ca3af;
}

.minimal-date {
  font-size: 0.875rem;
  color: #9ca3af;
}

.minimal-list {
  list-style: none;
  color: #4b5563;
  font-size: 0.95rem;
}

body.dark .minimal-list {
  color: #d1d5db;
}

.minimal-list li {
  margin-bottom: 0.5rem;
  position: relative;
  padding-left: 1.25rem;
}

.minimal-list li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: #9ca3af;
}

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

.experience-info h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1f2937;
  transition: color 0.3s ease;
}

body.dark .experience-info h3 {
  color: white;
}

.experience-company,
.experience-company.green {
  color: #3b82f6;
}

body.dark .experience-company,
body.dark .experience-company.green {
  color: rgb(100, 200, 255);
}

.experience-meta {
  text-align: right;
}

.experience-list {
  list-style: disc;
  padding-left: 1.5rem;
  color: #6b7280;
}

body.dark .experience-list {
  color: rgb(200, 200, 200);
}

.experience-list li {
  margin-bottom: 0.5rem;
}

/* Projects Grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.project-image-container {
  width: 100%;
  height: 180px;
  overflow: hidden;
  margin-bottom: 1rem;
  border-radius: 5px;
}

.project-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.project-card:hover .project-image {
  transform: scale(1.05);
}

.project-card {
  background-color: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.project-card:hover {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

body.dark .project-card {
  background-color: #1a1a22;
  border-color: #27272a;
}

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

.project-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1f2937;
  transition: color 0.3s ease;
}

body.dark .project-title {
  color: white;
}

.project-description {
  color: #6b7280;
  margin-bottom: 1rem;
  transition: color 0.3s ease;
}

body.dark .project-description {
  color: rgb(200, 200, 200);
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.project-tag {
  background-color: #f3f4f6;
  color: #374151;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.875rem;
}

body.dark .project-tag {
  background-color: rgb(55, 55, 55);
  color: rgb(200, 200, 200);
}

.project-tag.blue {
  background-color: #dbeafe;
  color: #1e40af;
}

body.dark .project-tag.blue {
  background-color: rgb(30, 64, 175);
  color: white;
}

.project-tag.green {
  background-color: #dcfce7;
  color: #166534;
}

body.dark .project-tag.green {
  background-color: rgb(22, 163, 74);
  color: white;
}

.project-tag.purple {
  background-color: #f3e8ff;
  color: #7c3aed;
}

body.dark .project-tag.purple {
  background-color: rgb(147, 51, 234);
  color: white;
}

.project-tag.yellow {
  background-color: #fef3c7;
  color: #d97706;
}

body.dark .project-tag.yellow {
  background-color: rgb(245, 158, 11);
  color: white;
}

.project-tag.red {
  background-color: #fee2e2;
  color: #dc2626;
}

body.dark .project-tag.red {
  background-color: rgb(220, 38, 38);
  color: white;
}

.project-links {
  display: flex;
  gap: 1rem;
}

.project-link {
  color: #3b82f6;
  text-decoration: none;
  transition: all 0.3s ease;
}

.project-link:hover {
  text-decoration: underline;
}

body.dark .project-link {
  color: rgb(100, 200, 255);
}

.project-link.secondary {
  color: #6b7280;
}

body.dark .project-link.secondary {
  color: rgb(200, 200, 200);
}

/* Skills List */
.skills-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.skill-category {
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 1rem;
}

body.dark .skill-category {
  border-bottom-color: #27272a;
}

.skill-category:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.skill-category-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #9ca3af;
  margin-bottom: 0.75rem;
}

body.dark .skill-category-title {
  color: #6b7280;
}

.skill-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.skill-pill {
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  color: #1f2937;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

body.dark .skill-pill {
  background-color: #1a1a22;
  border-color: #27272a;
  color: #e5e5e5;
}

.skill-pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

body.dark .skill-pill:hover {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
}

.skill-list {
  list-style: none;
  font-size: 0.875rem;
  color: #6b7280;
}

body.dark .skill-list {
  color: #9ca3af;
}

.skill-list li {
  margin-bottom: 0.25rem;
}

/* Contact Section */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.contact-info h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #1f2937;
  transition: color 0.3s ease;
}

body.dark .contact-info h3 {
  color: white;
}

.contact-info p {
  color: #6b7280;
  margin-bottom: 1.5rem;
  transition: color 0.3s ease;
}

body.dark .contact-info p {
  color: rgb(200, 200, 200);
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.contact-item svg {
  width: 20px;
  height: 20px;
  color: #3b82f6;
}

body.dark .contact-item svg {
  color: rgb(100, 200, 255);
}

.contact-item span,
.contact-item a {
  color: #1f2937;
  text-decoration: none;
  transition: color 0.3s ease;
}

body.dark .contact-item span,
body.dark .contact-item a {
  color: white;
}

.contact-item a:hover {
  text-decoration: underline;
}

/* Form Styles */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: #1f2937;
  transition: color 0.3s ease;
}

body.dark .form-group label {
  color: white;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

body.dark .form-group input,
body.dark .form-group textarea {
  background-color: transparent;
  border-color: #27272a;
  color: #e5e5e5;
}

.submit-btn {
  width: 100%;
  background-color: #3b82f6;
  color: white;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 0.375rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.submit-btn:hover {
  background-color: #2563eb;
}

/* Responsive */
@media (max-width: 1024px) {
  .content-wrapper {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    position: static;
  }

  .nav-links {
    display: none;
  }
}

@media (max-width: 768px) {
  .nav-items {
    gap: 1rem;
  }

  .main-container {
    padding: 1rem;
  }

  .timeline-header,
  .experience-header {
    flex-direction: column;
    align-items: start;
  }

  .experience-meta {
    text-align: left;
  }
}

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

.download-cv {
  margin-top: 20px;
  text-align: center;
}

.download-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.6rem 1rem;
  background-color: transparent;
  color: #1f2937;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

body.dark .download-button {
  color: #e5e5e5;
  border-color: #27272a;
}

.download-button:hover {
  background-color: #f3f4f6;
  text-decoration: none;
}

body.dark .download-button:hover {
  background-color: #27272a;
}

.download-icon {
  width: 18px;
  height: 18px;
  margin-right: 8px;
}

/* Main Content Styles */
.main-content {
  flex-grow: 1;
}

/* Language Switcher */
.language-switcher {
  display: flex;
  align-items: center;
}

.language-switcher .btn-link {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-size: inherit;
  /* Inherit font size from nav-link */
}

.language-switcher .active-lang {
  font-weight: bold;
  text-decoration: underline;
}

/* Certificates */
.certificate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.certificate-card {
  background-color: white;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  overflow: hidden;
  transition: all 0.3s ease;
}

.certificate-card:hover {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

body.dark .certificate-card {
  background-color: #1a1a22;
  border-color: #27272a;
}

.certificate-thumb-link {
  display: block;
  text-decoration: none;
}

.certificate-thumb-wrapper {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.dark .certificate-thumb-wrapper {
  background: rgb(45, 45, 45);
}

.cert-canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cert-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s ease;
}

.certificate-thumb-link:hover .cert-overlay {
  background: rgba(0, 0, 0, 0.45);
}

.cert-zoom-icon {
  width: 44px;
  height: 44px;
  color: white;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.certificate-thumb-link:hover .cert-zoom-icon {
  opacity: 1;
}

.certificate-thumb-wrapper.no-pdf {
  cursor: default;
}

.cert-icon-placeholder {
  width: 60px;
  height: 60px;
  color: #aaa;
}

.certificate-info {
  padding: 1rem 1.25rem;
}

.cert-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.35rem 0;
  line-height: 1.3;
  color: #1f2937;
  transition: color 0.3s ease;
}

body.dark .cert-title {
  color: white;
}

.cert-issuer {
  font-size: 0.85rem;
  color: #3b82f6;
  margin: 0 0 0.25rem 0;
  transition: color 0.3s ease;
}

body.dark .cert-issuer {
  color: rgb(100, 200, 255);
}

.cert-date {
  font-size: 0.8rem;
  color: #6b7280;
  transition: color 0.3s ease;
}

body.dark .cert-date {
  color: rgb(160, 160, 160);
}

/* Alerts */
.alert {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  font-weight: 500;
  animation: slideIn 0.3s ease-out;
}

.alert svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.alert-success {
  background-color: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}

body.dark .alert-success {
  background-color: rgba(22, 101, 52, 0.2);
  border-color: #166534;
  color: #4ade80;
}

.alert-error {
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

body.dark .alert-error {
  background-color: rgba(153, 27, 27, 0.2);
  border-color: #991b1b;
  color: #f87171;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}