/* === Global Reset & Base Styles === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: #f9fafb;
  color: #1f2937;
  line-height: 1.6;
  padding: 1rem;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* === Header Section === */
.top-section {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
  position: relative;
}

.headshot-container {
  flex: 0 0 auto;
}

.resume-headshot {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 3px solid #2563eb;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.resume-headshot:hover {
  transform: scale(1.05);
}

.contact-info h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #111827;
}

.contact-info p {
  font-size: 1rem;
  color: #4b5563;
}

.contact-info a {
  color: #2563eb;
  text-decoration: none;
}

.contact-info a:hover {
  text-decoration: underline;
}

/* Toggle container for dark mode */
.toggle-container {
  margin-left: auto;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
}

/* === Resume Sections === */
.resume {
  max-width: 900px;
  margin: 0 auto;
}

.resume-section {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: white;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
}

.resume-section:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
}

.resume-section h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #2563eb;
  margin-bottom: 1rem;
  position: relative;
}

.resume-section h2::after {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  background: #2563eb;
  margin-top: 0.4rem;
  border-radius: 2px;
}

ul {
  list-style: none;
  padding-left: 0;
}

li {
  margin-bottom: 0.75rem;
}

/* === Timeline Styles === */
.timeline {
  position: relative;
  padding-left: 1.5rem;
  border-left: 3px solid #2563eb;
}

.timeline-entry {
  position: relative;
  padding: 1rem 0 1rem 1rem;
  cursor: pointer;
  transition: background 0.3s ease;
  user-select: none;
}

.timeline-entry:hover {
  background: rgba(37, 99, 235, 0.05);
}

.timeline-dot {
  position: absolute;
  top: 1.25rem;
  left: -8px;
  width: 14px;
  height: 14px;
  background-color: #2563eb;
  border-radius: 50%;
  border: 2px solid white;
}

.timeline-date {
  font-size: 0.9rem;
  font-weight: 600;
  color: #6b7280;
  margin-bottom: 0.25rem;
}

.timeline-content h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 0.2rem;
}

.timeline-content p {
  font-size: 0.95rem;
  color: #4b5563;
  margin-top: 0.25rem;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.4s ease;
}

.timeline-content p.expanded {
  max-height: 500px;
  opacity: 1;
}

/* === Dark Mode === */
body.dark {
  background-color: #222222;
  color: #ddd;
}

body.dark .resume-section {
  background-color: #333333;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

body.dark .timeline {
  border-left-color: #555555;
}

body.dark .timeline-dot {
  background-color: #555555;
  border-color: #222222;
}

body.dark .timeline-date {
  color: #aaa;
}

body.dark .timeline-content h3 {
  color: #eee;
}

body.dark .timeline-content p {
  color: #bbb;
}

body.dark .contact-info h1 {
  color: #eee;
}

body.dark .contact-info p {
  color: #bbb;
}

body.dark .contact-info a {
  color: #6f9fff;
}

/* === Dark Mode Toggle Switch === */
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 28px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.slider {
  position: absolute;
  cursor: pointer;
  background-color: #ccc;
  border-radius: 34px;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  transition: 0.4s;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.slider:before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: 0.4s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

input:checked + .slider {
  background-color: #444;
}

input:checked + .slider:before {
  transform: translateX(22px);
}

/* === Responsive Design === */
@media (max-width: 600px) {
  .resume-headshot {
    width: 100px;
    height: 100px;
  }

  .contact-info h1 {
    font-size: 1.5rem;
  }

  .resume-section {
    padding: 1rem;
  }

  .toggle-container {
    margin-left: 0;
    margin-top: 1rem;
    width: 100%;
    justify-content: flex-start;
  }
}
