/* ═══════════════════════════════════════════════════════════════
   EDUCATION.CSS  –  Education Section (Module 6)
   Jeeva Sivan Portfolio | Dark Futuristic Developer Theme
   ═══════════════════════════════════════════════════════════════ */

/* ─── Section layout ─────────────────────────────────────────── */
.edu-content {
  padding-block: var(--sp-24);
}

.edu-header {
  margin-bottom: var(--sp-16);
}

.edu-header .section-desc {
  margin-top: var(--sp-4);
  margin-bottom: 0;
}

/* ═══════════════════════════════════════════════════════════════
   TIMELINE CONTAINER
   ═══════════════════════════════════════════════════════════════ */
.edu-timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--sp-12);
  padding-block: var(--sp-4);
  max-width: 960px;
  margin-inline: auto;
}

/* ── Vertical centre line ── */
.edu-timeline-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  transform: translateX(-50%);
  background: rgba(59, 130, 246, 0.08);
  border-radius: 2px;
  overflow: hidden;
}

/* Fill that animates in on scroll (driven by JS) */
.edu-timeline-line-fill {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0%;               /* animated to 100% by JS */
  background: linear-gradient(
    180deg,
    rgba(96, 165, 250, 0.7)   0%,
    rgba(6, 182, 212, 0.6)   40%,
    rgba(167, 139, 250, 0.6) 80%,
    transparent              100%
  );
  transition: height 1.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 2px;
}

/* ═══════════════════════════════════════════════════════════════
   TIMELINE ENTRY (each education item)
   ═══════════════════════════════════════════════════════════════ */
.edu-entry {
  position: relative;
  display: flex;
  align-items: flex-start;
  width: 50%;
  padding-bottom: var(--sp-4);
}

/* Left-side entries sit on the left half */
.edu-entry-left {
  align-self: flex-start;
  padding-right: calc(var(--sp-12) + 12px); /* room for dot */
  flex-direction: row-reverse;              /* card → dot */
}

/* Right-side entries sit on the right half, offset to the right */
.edu-entry-right {
  align-self: flex-end;
  padding-left: calc(var(--sp-12) + 12px);
}

/* ═══════════════════════════════════════════════════════════════
   CONNECTOR DOT
   ═══════════════════════════════════════════════════════════════ */
.edu-dot {
  position: absolute;
  top: 28px;
  z-index: 2;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Left entry: dot sits at right edge of its 50% column (the centre line) */
.edu-entry-left  .edu-dot { right: -9px; }
/* Right entry: dot sits at left edge of its 50% column (the centre line) */
.edu-entry-right .edu-dot { left: -9px; }

/* Inner filled circle */
.edu-dot-inner {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  position: relative;
  z-index: 1;
}
.edu-dot-1 .edu-dot-inner {
  background: var(--clr-blue-bright);
  box-shadow: 0 0 10px rgba(96, 165, 250, 0.8), 0 0 24px rgba(96, 165, 250, 0.4);
}
.edu-dot-2 .edu-dot-inner {
  background: var(--clr-purple-bright);
  box-shadow: 0 0 10px rgba(167, 139, 250, 0.8), 0 0 24px rgba(139, 92, 246, 0.4);
}
.edu-dot-3 .edu-dot-inner {
  background: var(--clr-cyan-bright);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.8), 0 0 24px rgba(6, 182, 212, 0.4);
}

/* Pulsing rings */
.edu-dot-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid;
  opacity: 0;
  animation: edu-ring-pulse 2.8s ease-out infinite;
}
.edu-dot-ring-b { animation-delay: 1.4s; }

.edu-dot-1 .edu-dot-ring { border-color: rgba(96, 165, 250, 0.7); }
.edu-dot-2 .edu-dot-ring { border-color: rgba(167, 139, 250, 0.7); }
.edu-dot-3 .edu-dot-ring { border-color: rgba(6, 182, 212, 0.7); }

.edu-dot-ring-a { width: 26px; height: 26px; }
.edu-dot-ring-b { width: 36px; height: 36px; }

@keyframes edu-ring-pulse {
  0%   { opacity: 0.7; transform: scale(0.5); }
  100% { opacity: 0;   transform: scale(1.8); }
}

/* ═══════════════════════════════════════════════════════════════
   YEAR TAG
   ═══════════════════════════════════════════════════════════════ */
.edu-year-tag {
  position: absolute;
  top: 22px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: var(--fw-bold);
  letter-spacing: 0.06em;
  color: var(--clr-text-muted);
  white-space: nowrap;
  pointer-events: none;
}

/* Left entry: year tag on the right side of the centre (past the dot) */
.edu-year-right {
  right: -80px;
  color: var(--clr-blue-bright);
  opacity: 0.7;
}

/* Right entry: year tag on the left side of the centre */
.edu-year-left {
  left: -62px;
  color: var(--clr-purple-bright);
  opacity: 0.7;
}

/* ═══════════════════════════════════════════════════════════════
   EDUCATION CARD
   ═══════════════════════════════════════════════════════════════ */
.edu-card {
  position: relative;
  width: 100%;
  padding: var(--sp-6);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition:
    border-color var(--transition-base),
    box-shadow var(--transition-base),
    transform var(--transition-bounce);
}

.edu-card:hover {
  transform: translateY(-4px);
}

.edu-card-college:hover {
  border-color: rgba(96, 165, 250, 0.35);
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.5),
    0 0 32px rgba(59, 130, 246, 0.1);
}

.edu-card-school:hover,
.edu-card-school-hsc1:hover {
  border-color: rgba(167, 139, 250, 0.35);
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.5),
    0 0 32px rgba(139, 92, 246, 0.1);
}

/* ── Top accent bar ── */
.edu-card-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
}
.edu-card-bar-blue {
  background: linear-gradient(90deg, rgba(29, 78, 216, 0.5) 0%, rgba(96, 165, 250, 1) 50%, rgba(29, 78, 216, 0.5) 100%);
}
.edu-card-bar-purple {
  background: linear-gradient(90deg, rgba(76, 29, 149, 0.5) 0%, rgba(167, 139, 250, 1) 50%, rgba(76, 29, 149, 0.5) 100%);
}
.edu-card-bar-cyan {
  background: linear-gradient(90deg, rgba(8, 145, 178, 0.5) 0%, rgba(6, 182, 212, 1) 50%, rgba(8, 145, 178, 0.5) 100%);
}

/* ── Card header row: icon + institution ── */
.edu-card-header {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-4);
  margin-bottom: var(--sp-5);
}

/* Icon box */
.edu-icon-box {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: box-shadow var(--transition-base);
}

.edu-icon-blue {
  background: rgba(37, 99, 235, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.25);
  color: var(--clr-blue-bright);
}
.edu-card:hover .edu-icon-blue {
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

.edu-icon-purple {
  background: rgba(109, 40, 217, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.25);
  color: var(--clr-purple-bright);
}
.edu-card:hover .edu-icon-purple {
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
}

.edu-icon-cyan {
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.25);
  color: var(--clr-cyan-bright);
}
.edu-card:hover .edu-icon-cyan {
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.3);
}

/* Institution name + location */
.edu-card-title-block {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  min-width: 0;
}

.edu-institution {
  font-size: var(--fs-md);
  font-weight: var(--fw-bold);
  color: var(--clr-text-primary);
  line-height: var(--lh-snug);
}

.edu-location {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  font-size: var(--fs-xs);
  color: var(--clr-text-muted);
  font-family: var(--font-mono);
  letter-spacing: 0.03em;
}

/* ── Degree row ── */
.edu-degree-row {
  display: flex;
  align-items: baseline;
  gap: var(--sp-3);
  margin-bottom: var(--sp-5);
}

.edu-degree-badge {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: var(--fw-bold);
  letter-spacing: 0.06em;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  color: var(--clr-blue-bright);
  background: rgba(37, 99, 235, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.edu-degree-badge-purple {
  color: var(--clr-purple-bright);
  background: rgba(109, 40, 217, 0.1);
  border-color: rgba(139, 92, 246, 0.25);
}

.edu-degree-badge-cyan {
  color: var(--clr-cyan-bright);
  background: rgba(6, 182, 212, 0.1);
  border-color: rgba(6, 182, 212, 0.25);
}

.edu-degree {
  font-size: var(--fs-sm);
  color: var(--clr-text-secondary);
  line-height: var(--lh-snug);
}

/* ── Stats row ── */
.edu-stats {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-4);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-lg);
  margin-bottom: var(--sp-5);
  flex-wrap: wrap;
}

.edu-stat {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  min-width: 0;
}

.edu-stat-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: var(--fw-medium);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--clr-text-muted);
}

.edu-stat-value {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--clr-text-primary);
  font-family: var(--font-mono);
}

.edu-stat-highlight {
  color: var(--clr-blue-bright);
  font-size: var(--fs-base);
  font-weight: var(--fw-bold);
}

.edu-stat-highlight-purple {
  color: var(--clr-purple-bright);
  font-size: var(--fs-base);
  font-weight: var(--fw-bold);
}

.edu-stat-highlight-cyan {
  color: var(--clr-cyan-bright);
  font-size: var(--fs-base);
  font-weight: var(--fw-bold);
}

/* Thin vertical divider between stats */
.edu-stat-divider {
  width: 1px;
  height: 32px;
  background: rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

/* Status chips */
.edu-status-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: var(--fw-medium);
  letter-spacing: 0.04em;
  color: var(--clr-cyan-bright);
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.2);
  border-radius: var(--radius-full);
  padding: 3px 10px;
  white-space: nowrap;
}

.edu-status-chip.edu-status-done {
  color: rgba(134, 239, 172, 0.9);  /* soft green */
  background: rgba(34, 197, 94, 0.08);
  border-color: rgba(34, 197, 94, 0.2);
}

.edu-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--clr-cyan);
  animation: edu-status-pulse 2s ease-in-out infinite;
}

.edu-status-dot-done {
  background: rgba(34, 197, 94, 0.9);
  animation: none;
}

@keyframes edu-status-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.75); }
}

/* ── Progress bar ── */
.edu-progress-wrap {
  margin-top: 0;
}

.edu-progress-bar {
  position: relative;
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
  overflow: visible;
}

.edu-progress-bar-purple {
  /* same container, just a visual variant for purple */
}

.edu-progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.edu-progress-fill-blue {
  background: linear-gradient(90deg, rgba(29, 78, 216, 0.8) 0%, rgba(96, 165, 250, 1) 100%);
  box-shadow: 0 0 12px rgba(96, 165, 250, 0.4);
}

.edu-progress-fill-purple {
  background: linear-gradient(90deg, rgba(76, 29, 149, 0.8) 0%, rgba(167, 139, 250, 1) 100%);
  box-shadow: 0 0 12px rgba(167, 139, 250, 0.4);
}

.edu-progress-fill-cyan {
  background: linear-gradient(90deg, rgba(8, 145, 178, 0.8) 0%, rgba(6, 182, 212, 1) 100%);
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.4);
}

.edu-progress-label {
  position: absolute;
  right: 0;
  top: -22px;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: var(--fw-medium);
  color: var(--clr-text-muted);
  letter-spacing: 0.05em;
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — TABLET (≤ 900px): collapse to single column
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .edu-timeline {
    max-width: 600px;
    padding-left: 36px;  /* space for the line + dot on the left */
    gap: var(--sp-10);
  }

  /* Centre line moves to the left */
  .edu-timeline-line {
    left: 12px;
    transform: none;
  }

  /* All entries go full-width, stacked */
  .edu-entry,
  .edu-entry-left,
  .edu-entry-right {
    width: 100%;
    align-self: auto;
    flex-direction: row;   /* card normal direction */
    padding-left: var(--sp-10);
    padding-right: 0;
  }

  /* Dots always on the left */
  .edu-entry-left  .edu-dot,
  .edu-entry-right .edu-dot {
    left: -30px;
    right: auto;
  }

  /* Year tags above/inside the card area */
  .edu-year-right,
  .edu-year-left {
    position: static;
    display: block;
    margin-bottom: var(--sp-2);
    font-size: 0.6rem;
  }
}

/* ── Mobile (≤ 480px) ── */
@media (max-width: 480px) {
  .edu-content   { padding-block: var(--sp-16); }
  .edu-timeline  { padding-left: 28px; }
  .edu-timeline-line { left: 8px; }

  .edu-entry,
  .edu-entry-left,
  .edu-entry-right {
    padding-left: var(--sp-8);
  }

  .edu-entry-left  .edu-dot,
  .edu-entry-right .edu-dot { left: -26px; }

  .edu-card     { padding: var(--sp-5); }
  .edu-stats    { gap: var(--sp-3); padding: var(--sp-3); }
  .edu-stat-divider { height: 24px; }
  .edu-icon-box { width: 40px; height: 40px; }
  .edu-institution { font-size: var(--fs-base); }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .edu-dot-ring,
  .edu-status-dot,
  .edu-timeline-line-fill {
    animation: none !important;
    transition: none !important;
  }
  .edu-timeline-line-fill { height: 100% !important; }
  .edu-progress-fill { transition: none !important; }
}

/* ── Certificate Link Button ── */
.edu-cert-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  color: var(--clr-cyan-bright);
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.25);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  text-decoration: none;
  width: fit-content;
  transition: all var(--transition-bounce);
}

.edu-cert-btn:hover {
  color: #ffffff;
  background: rgba(6, 182, 212, 0.25);
  border-color: rgba(6, 182, 212, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(6, 182, 212, 0.3);
}

.edu-cert-btn svg {
  transition: transform var(--transition-fast);
}

.edu-cert-btn:hover svg {
  transform: translate(2px, -2px);
}
