:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f9f9f9;
  --bg-tertiary: #f0f0f0;
  --text-primary: #333333;
  --text-secondary: #555555;
  --text-tertiary: #666666;
  --border-color: #dddddd;
  --social-button-bg: #333333;
  --social-button-hover: #555555;
  --timeline-dot-bg: #333333;
  --timeline-dot-border: #ffffff;
  --timeline-dot-shadow: #333333;
  --timeline-date-bg: #333333;
  --timeline-date-hover: #555555;
  --filter-button-border: #333333;
  --filter-button-bg: transparent;
  --filter-button-color: #333333;
  --filter-button-active-bg: #333333;
  --filter-button-active-color: #ffffff;
  --timeline-content-border: #333333;
  --timeline-link-color: #333333;
  --timeline-link-hover: #555555;
  --theme-toggle-bg: #333333;
  --theme-toggle-hover: #555555;
  --shadow-color: rgba(0, 0, 0, 0.1);
  --profile-shadow: #222222;
  --tech-type-color: #888888;
}

[data-theme="dark"] {
  --bg-primary: #1a1a1a;
  --bg-secondary: #242424;
  --bg-tertiary: #2d2d2d;
  --text-primary: #e0e0e0;
  --text-secondary: #b0b0b0;
  --text-tertiary: #909090;
  --border-color: #444444;
  --social-button-bg: #e0e0e0;
  --social-button-hover: #ffffff;
  --timeline-dot-bg: #e0e0e0;
  --timeline-dot-border: #1a1a1a;
  --timeline-dot-shadow: #555555;
  --timeline-date-bg: #e0e0e0;
  --timeline-date-hover: #ffffff;
  --filter-button-border: #e0e0e0;
  --filter-button-bg: transparent;
  --filter-button-color: #e0e0e0;
  --filter-button-active-bg: #e0e0e0;
  --filter-button-active-color: #1a1a1a;
  --timeline-content-border: #e0e0e0;
  --timeline-link-color: #e0e0e0;
  --timeline-link-hover: #ffffff;
  --theme-toggle-bg: #ffffff;
  --theme-toggle-hover: #e0e0e0;
  --shadow-color: rgba(0, 0, 0, 0.3);
  --profile-shadow: #000000;
  --tech-type-color: #888888;
}

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

/* Open Sans Font Utility Class */
.open-sans {
  font-family: "Open Sans", sans-serif;
  font-optical-sizing: auto;
  font-style: normal;
  font-variation-settings: "wdth" 100;
}

body {
  font-family: "Open Sans", sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition: background-color 0.3s ease, color 0.3s ease;
}

.navbar {
  display: none;
}

.body {
  flex: 1;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 3rem;
}

.header-section {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  max-width: 900px;
  width: 100%;
}

.header-left {
  flex: 1;
  text-align: left;
}

.header-left h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.header-left .tagline {
  font-size: 1.1rem;
  color: var(--text-tertiary);
  margin-bottom: 1.5rem;
}

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

.social-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  background-color: var(--social-button-bg);
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-size: 0.95rem;
  transition:
    background-color 0.3s ease,
    transform 0.2s ease;
}

.social-button img {
  width: 20px;
  height: 20px;
  transition: filter 0.3s ease;
}

[data-theme="dark"] .social-button {
  color: #1a1a1a;
}

[data-theme="dark"] .social-button img {
  filter: brightness(0);
}

.social-button:hover {
  background-color: var(--social-button-hover);
  transform: translateY(-2px);
}

.header-right {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.profile-image {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  -webkit-filter: drop-shadow(5px 5px 5px var(--profile-shadow));
  filter: drop-shadow(5px 5px 5px var(--profile-shadow));
}

.about-section {
  max-width: 900px;
  width: 100%;
}

.about-content {
  text-align: center;
}

.about-content h2 {
  font-size: 2rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.about-text {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto;
}

.timeline-section {
  max-width: 1200px;
  width: 100%;
}

.timeline-content {
  text-align: center;
}

.timeline-content h2 {
  font-size: 2rem;
  color: var(--text-primary);
  margin-bottom: 2rem;
}

/* Timeline filters */
.timeline-filters {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.7rem 1.5rem;
  border: 2px solid var(--filter-button-border);
  background-color: var(--filter-button-bg);
  color: var(--filter-button-color);
  border-radius: 25px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  font-family: "Open Sans", sans-serif;
  transition: background-color 0.3s ease;
}

.filter-btn:hover {
  background-color: var(--bg-tertiary);
}

.filter-btn.active {
  background-color: var(--filter-button-active-bg);
  color: var(--filter-button-active-color);
}

.filter-btn:focus {
  outline: none;
}

.timeline {
  position: relative;
  max-width: 700px;
  margin: 0 auto;
  padding: 1rem 0;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 100%;
  background-color: var(--border-color);
  border-radius: 3px;
}

.timeline-item {
  position: relative;
  margin-bottom: 3rem;
  display: flex;
  align-items: center;
  opacity: 1;
}

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

.timeline-dot {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 18px;
  height: 18px;
  background-color: var(--timeline-dot-bg);
  border: 4px solid var(--timeline-dot-border);
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--timeline-dot-shadow);
  z-index: 2;
}

.timeline-date {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--timeline-date-bg);
  color: #1a1a1a;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  margin-top: -40px;
  z-index: 3;
}

[data-theme="light"] .timeline-date {
  color: white;
}

.timeline-content-box {
  width: 45%;
  padding: 1.5rem;
  background-color: var(--bg-secondary);
  border-radius: 10px;
  border-left: 4px solid var(--timeline-content-border);
}

/* Alternating timeline layout - even items on the right, odd items on the left */
.timeline-item.timeline-left .timeline-content-box {
  margin-left: auto;
}

.timeline-item.timeline-right .timeline-content-box {
  margin-right: auto;
  border-left: none;
  border-right: 4px solid var(--timeline-content-border);
}

/* Fallback to nth-child for initial render before positioning is applied */
.timeline-item:not(.timeline-left):not(.timeline-right):nth-child(odd)
  .timeline-content-box {
  margin-left: auto;
}

.timeline-item:not(.timeline-left):not(.timeline-right):nth-child(even)
  .timeline-content-box {
  margin-right: auto;
  border-left: none;
  border-right: 4px solid var(--timeline-content-border);
}

.timeline-content-box h3 {
  font-size: 1.3rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.timeline-content-box p {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.footer {
  display: none;
}

/* Theme toggle button */
.theme-toggle {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--theme-toggle-bg);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px var(--shadow-color);
  z-index: 1000;
  color: #ffffff;
}

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

.theme-toggle:hover {
  background-color: var(--theme-toggle-hover);
}

.theme-toggle:focus {
  outline: none;
}

.theme-toggle svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
  stroke: currentColor;
}

.theme-toggle .sun-icon {
  display: none;
}

.theme-toggle .moon-icon {
  display: block;
}

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

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

/* Responsive design for mobile devices */
@media (max-width: 768px) {
  .theme-toggle {
    bottom: 1rem;
    left: 1rem;
    width: 45px;
    height: 45px;
  }
  .header-section {
    flex-direction: column-reverse;
    gap: 2rem;
    text-align: center;
  }

  .header-left {
    text-align: center;
  }

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

  .header-left .tagline {
    font-size: 1rem;
  }

  .social-links {
    justify-content: center;
  }

  .profile-image {
    width: 150px;
    height: 150px;
  }

  .body {
    padding: 1.5rem;
    gap: 2rem;
  }

  .about-content h2 {
    font-size: 1.75rem;
  }

  .about-text {
    font-size: 1rem;
  }

  .timeline-content h2 {
    font-size: 1.75rem;
    margin-bottom: 2rem;
  }

  .timeline-filters {
    gap: 0.7rem;
    margin-bottom: 2rem;
  }

  .filter-btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
  }

  .timeline {
    max-width: 100%;
  }

  .timeline::before {
    left: 20px;
  }

  .timeline-item {
    flex-direction: column;
    align-items: flex-start;
    padding-left: 50px;
  }

  .timeline-dot {
    left: 20px;
    transform: translateX(-50%);
  }

  .timeline-item:hover .timeline-dot {
    transform: translateX(-50%) scale(1.2);
  }

  .timeline-date {
    left: 20px;
    transform: translateX(-50%);
    margin-top: -35px;
    font-size: 0.85rem;
    padding: 0.3rem 0.8rem;
  }

  .timeline-content-box {
    width: 100%;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding: 1.2rem;
    border-left: 4px solid var(--timeline-content-border) !important;
    border-right: none !important;
  }

  .timeline-item:hover .timeline-content-box {
    transform: translateY(-2px);
  }
}

/* Tech badges styling */
.tech-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.tech-badge {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  border-radius: 16px;
  font-size: 0.85rem;
  font-weight: 500;
  color: white;
}

/* Technologies with light backgrounds need dark text */
.tech-badge.text-dark {
  color: #333;
}

/* Timeline type label (for projects) */
.timeline-type {
  font-size: 0.9rem;
  color: var(--tech-type-color);
  font-weight: 500;
  font-style: italic;
}

/* Timeline links (for projects) */
.timeline-links {
  font-size: 0.85rem;
  margin-top: 0.8rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.timeline-link {
  color: var(--timeline-link-color);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.timeline-link:hover {
  color: var(--timeline-link-hover);
  text-decoration: underline;
}

@media (max-width: 480px) {
  .header-left h1 {
    font-size: 1.75rem;
  }

  .profile-image {
    width: 120px;
    height: 120px;
  }

  .social-button {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }
}
