/* ============================= Root Variables ============================= */
:root {
  --bg-primary: #000000;
  --bg-secondary: #111111;
  --bg-tertiary: #1a1a1a;
  --bg-card: #0f0f0f;

  --text-primary: #ffffff;
  --text-secondary: #cccccc;
  --text-light: #999999;

  --accent-primary: #ffffff;
  --accent-secondary: #e0e0e0;
  --border-color: #333333;
  --border-light: #222222;

  --shadow-light: rgba(255, 255, 255, 0.05);
  --shadow-medium: rgba(255, 255, 255, 0.1);
  --shadow-heavy: rgba(255, 255, 255, 0.15);

  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Poppins", sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ============================= Page Header ============================= */
.page-header {
  background: var(--bg-primary);
  color: var(--text-primary);
  padding: 10px 0 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border-color);
}

.page-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0.5;
}

.page-header .container {
  position: relative;
  z-index: 2;
}

.page-title {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 1rem;
  letter-spacing: -1px;
  color: var(--text-primary);
}

.page-subtitle {
  font-size: 1.2rem;
  font-weight: 300;
  opacity: 0.8;
  max-width: 600px;
  margin: 0 auto;
  color: var(--text-secondary);
}

/* ============================= Education Section ============================= */
.education-section {
  padding: 100px 0;
  background: var(--bg-secondary);
  position: relative;
}


.timeline {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(to bottom, var(--accent-primary), var(--border-color));
  transform: translateX(-50%);
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  margin-bottom: 4rem;
  opacity: 0;
  transform: translateY(50px);
  transition: var(--transition-slow);
}

.timeline-item.animate {
  opacity: 1;
  transform: translateY(0);
}

.timeline-item:nth-child(odd) .timeline-content {
  margin-right: calc(50% + 3rem);
  text-align: right;
}

.timeline-item:nth-child(even) .timeline-content {
  margin-left: calc(50% + 3rem);
}

.timeline-marker {
  position: absolute;
  left: 50%;
  top: 2rem;
  width: 24px;
  height: 24px;
  background: var(--bg-primary);
  border: 4px solid var(--accent-primary);
  border-radius: 50%;
  transform: translateX(-50%);
  z-index: 2;
  transition: var(--transition);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.timeline-marker:hover {
  transform: translateX(-50%) scale(1.2);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
}

.marker-inner {
  width: 8px;
  height: 8px;
  background: var(--accent-primary);
  border-radius: 50%;
  margin: 4px auto;
  transition: var(--transition);
}

.timeline-marker:hover .marker-inner {
  background: var(--bg-primary);
}

.education-card {
  background: var(--bg-card);
  padding: 2.5rem;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.education-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--accent-primary);
  transform: scaleX(0);
  transition: var(--transition);
}

.education-card:hover::before {
  transform: scaleX(1);
}

.education-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  border-color: var(--accent-primary);
}

.education-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.degree-info {
  flex: 1;
}

.degree-info h3 {
  color: var(--text-primary);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.degree-type {
  background: var(--accent-primary);
  color: var(--bg-primary);
  padding: 0.3rem 0.8rem;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.education-period {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  padding: 0.8rem 1.5rem;
  border-radius: 25px;
  font-size: 0.9rem;
  font-weight: 600;
  border: 2px solid var(--border-color);
  transition: var(--transition);
}

.education-card:hover .education-period {
  background: var(--accent-primary);
  color: var(--bg-primary);
  border-color: var(--accent-primary);
}

.education-institution {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.education-institution:last-of-type {
  border-bottom: none;
}

.education-institution h4 {
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
  font-weight: 600;
}

.location {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin: 0;
  font-weight: 500;
}

.branch-info {
  color: var(--text-light);
  font-size: 0.9rem;
  font-style: italic;
  margin-top: 0.25rem;
}

.academic-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: var(--bg-tertiary);
  border-radius: 15px;
  border: 1px solid var(--border-color);
}

.stat-item {
  text-align: center;
}

.stat-label {
  display: block;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  display: block;
  color: var(--text-primary);
  font-size: 1.3rem;
  font-weight: 700;
}

.coursework {
  margin-top: 2rem;
}

.coursework h5 {
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.course-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.course-tag {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  padding: 0.6rem 1.2rem;
  border-radius: 25px;
  font-size: 0.85rem;
  font-weight: 500;
  border: 2px solid var(--border-color);
  transition: var(--transition);
  cursor: default;
}

.course-tag:hover {
  background: var(--accent-primary);
  color: var(--bg-primary);
  border-color: var(--accent-primary);
  transform: translateY(-2px);
}

/* ============================= Scroll Progress ============================= */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: var(--accent-primary);
  z-index: 1000;
  transition: width 0.1s ease;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

/* ============================= Responsive Design ============================= */
@media (max-width: 992px) {
  .page-title {
    font-size: 2.8rem;
  }

  .timeline::before {
    left: 2rem;
  }

  .timeline-item:nth-child(odd) .timeline-content,
  .timeline-item:nth-child(even) .timeline-content {
    margin-left: 4.5rem;
    margin-right: 0;
    text-align: left;
  }

  .timeline-marker {
    left: 2rem;
  }

  .academic-stats {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

@media (max-width: 768px) {
  .page-title {
    font-size: 2.2rem;
  }

  .page-subtitle {
    font-size: 1rem;
  }

  .education-section {
    padding: 60px 0;
  }

  .education-card {
    padding: 2rem 1.5rem;
  }

  .education-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .skills-section {
    padding: 60px 0;
  }

  .section-title {
    font-size: 2rem;
  }

  .skills-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .skill-category {
    padding: 2rem 1.5rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 40px;
  }

  .footer-section h3::after,
  .footer-section h4::after {
    left: 50%;
    transform: translateX(-50%);
  }

  .footer-section ul li a {
    padding-left: 0;
  }

  .footer-section ul li a::before {
    display: none;
  }

  .social-links {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }

  .page-header {
    padding: 60px 0 50px;
  }

  .page-title {
    font-size: 1.8rem;
  }

  .education-card {
    padding: 1.5rem;
  }

  .course-tags {
    gap: 0.5rem;
  }

  .course-tag {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
  }
}

/* ============================= Smooth Scrolling ============================= */
html {
  scroll-behavior: smooth;
}

/* ============================= Custom Scrollbar ============================= */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--accent-primary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-secondary);
}

/* ============================= Selection ============================= */
::selection {
  background: var(--accent-primary);
  color: var(--bg-primary);
}

::-moz-selection {
  background: var(--accent-primary);
  color: var(--bg-primary);
}
