/* ===== General Reset ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Times New Roman', Times, serif;
  overflow-x: hidden;
  background: #4E8BC4;
  color: #2a2a2a;
}

/* ===== Navigation ===== */
.navbar {
  position: fixed;
  top: 30px;
  right: 40px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  z-index: 1000;
}

.nav-list {
  list-style: none;
  display: flex;
  gap: 25px;
}

.nav-list li a {
  text-decoration: none;
  color: #fff;
  font-size: 18px;
  font-weight: bold;
  letter-spacing: 1px;
  position: relative;
  transition: color 0.3s;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.2);
}

.nav-list li a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: #fff;
  transition: width 0.3s ease;
}

.nav-list li a:hover {
  color: #FFC2D9;
}

.nav-list li a:hover::after {
  width: 100%;
  background: #FFC2D9;
}

.menu-toggle {
  display: none;
  cursor: pointer;
  font-size: 28px;
  color: #fff;
  z-index: 1001;
}

/* ===== Hero Section ===== */
.hero {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero-title {
  font-size: 80px;
  font-weight: bold;
  color: #ffffff;
  letter-spacing: 4px;
  opacity: 0;
  transform: translateY(40px);
  animation: riseIn 1.2s ease forwards 0.3s;
  text-align: center;
  padding: 0 20px;
  text-shadow: 0 4px 25px rgba(0, 0, 0, 0.2);
}

.hero-line {
  width: 60px;
  height: 3px;
  background: #ffffff;
  margin-top: 24px;
  opacity: 0;
  animation: riseIn 1s ease forwards 0.8s;
}

.hero-sub {
  font-size: 16px;
  letter-spacing: 6px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.8);
  margin-top: 18px;
  opacity: 0;
  animation: riseIn 1s ease forwards 1.1s;
}

.scroll-cue {
  position: absolute;
  bottom: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0;
  animation: riseIn 1s ease forwards 1.6s;
}

.scroll-cue span {
  font-size: 13px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(255, 228, 238, 0.6);
}

.scroll-arrow {
  width: 20px;
  height: 20px;
  border-right: 2px solid rgba(255, 228, 238, 0.6);
  border-bottom: 2px solid rgba(255, 228, 238, 0.6);
  transform: rotate(45deg);
  animation: bounce 2s ease-in-out infinite;
}

/* ===== Keyframes ===== */
@keyframes riseIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bounce {
  0%, 100% { transform: rotate(45deg) translateY(0); }
  50% { transform: rotate(45deg) translateY(8px); }
}

@keyframes drift {
  0% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.05); }
  66% { transform: translate(-20px, 30px) scale(0.95); }
  100% { transform: translate(15px, 15px) scale(1.02); }
}

@keyframes shimmer {
  0% { transform: translate(0, 0) scale(1) rotate(0deg); }
  50% { transform: translate(20px, -30px) scale(1.15) rotate(5deg); }
  100% { transform: translate(-10px, 10px) scale(0.95) rotate(-3deg); }
}

@keyframes pulse-ring {
  0% { transform: translate(-50%, -50%) scale(0.8); opacity: 0.5; }
  50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.15; }
  100% { transform: translate(-50%, -50%) scale(0.8); opacity: 0.5; }
}

/* ===== Floating Orbs ===== */
.orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.orb-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle at 30% 30%, rgba(255, 194, 217, 0.45), rgba(78, 139, 196, 0.05) 70%);
  filter: blur(60px);
  top: -15%;
  left: -10%;
  animation: shimmer 16s ease-in-out infinite alternate;
  opacity: 0.7;
}

.orb-2 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.3), rgba(150, 203, 252, 0.1) 70%);
  filter: blur(40px);
  top: 15%;
  right: -5%;
  animation: drift 14s ease-in-out infinite alternate;
  opacity: 0.5;
}

.orb-3 {
  width: 200px;
  height: 200px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  top: 55%;
  left: 8%;
  animation: pulse-ring 8s ease-in-out infinite;
  opacity: 0.4;
}

.orb-4 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle at 70% 60%, rgba(255, 153, 190, 0.2), transparent 65%);
  filter: blur(50px);
  bottom: -10%;
  right: 15%;
  animation: shimmer 20s ease-in-out infinite alternate-reverse;
  opacity: 0.5;
}

/* ===== Education Heading ===== */
.education-word {
  text-align: center;
  padding: 100px 20px 20px;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}

.education-word.visible {
  opacity: 1;
  transform: translateY(0);
}

.education-word h2 {
  font-size: 28px;
  color: #fff;
  letter-spacing: 2px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

/* ===== Timeline ===== */
.timeline {
  position: relative;
  max-width: 1200px;
  margin: 50px auto 120px;
  padding: 0 20px;
}

/* SVG curvy path */
.timeline-path-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.timeline-bg-path {
  fill: none;
  stroke: rgba(255, 255, 255, 0.15);
  stroke-width: 3;
  stroke-linecap: round;
}

.timeline-active-path {
  fill: none;
  stroke: url(#pathGradient);
  stroke-width: 3;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.05s linear;
}

/* Traveling dot */
.timeline-dot {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.6), 0 0 40px rgba(255, 194, 217, 0.3);
  transform: translate(-50%, -50%);
  z-index: 2;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

/* ===== Timeline Containers ===== */
.container {
  padding: 50px 30px;
  position: relative;
  width: 50%;
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1;
}

.container.visible {
  opacity: 1;
  transform: translateY(0);
}

.left {
  left: 0;
  padding-right: 60px;
}

.right {
  left: 50%;
  padding-left: 60px;
}

/* ===== Text Boxes ===== */
.text-box {
  padding: 40px 45px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  position: relative;
  font-size: 15px;
  line-height: 1.8;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.text-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #4E8BC4, #C2E1FC, #FF99BE);
  border-radius: 20px 20px 0 0;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.3s;
}

.container.visible .text-box::before {
  transform: scaleX(1);
}

.text-box:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
  border-color: rgba(194, 225, 252, 0.8);
}

/* Card header inside text-box */
.card-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 16px;
}

.card-logo-img {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.card-meta h2 {
  font-size: 22px;
  font-weight: 600;
  color: #2a3a4a;
  margin-bottom: 2px;
}

.card-year {
  font-size: 13px;
  font-weight: 500;
  color: #4E8BC4;
  letter-spacing: 2px;
}

.text-box p {
  color: #444;
}

/* ===== Parallax Dot Field ===== */
.dot-field {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.dot-field span {
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
}

/* ===== Fixed Background Layer ===== */
.bg-section {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  transition: background 1s ease;
}

/* ===== Progress Bar ===== */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #4E8BC4, #96CBFC, #FF99BE);
  z-index: 2000;
  width: 0%;
  transition: width 0.1s linear;
}

/* ===== Custom Cursor Ring ===== */
.cursor-ring {
  position: fixed;
  width: 40px;
  height: 40px;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transition: transform 0.15s ease-out, width 0.3s, height 0.3s, border-color 0.3s;
  transform: translate(-50%, -50%);
}

.cursor-ring.hovering {
  width: 60px;
  height: 60px;
  border-color: rgba(255, 194, 217, 0.6);
}

/* ===== Footer ===== */
.site-footer {
  text-align: center;
  padding: 40px 20px 50px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  letter-spacing: 1.5px;
  position: relative;
}

.footer-line {
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.5));
  margin: 0 auto 24px;
  border-radius: 2px;
}

.footer-name {
  font-weight: bold;
  color: #fff;
}

.footer-year {
  margin-top: 6px;
  font-size: 12px;
  opacity: 0.5;
  letter-spacing: 1px;
}

/* ===== Responsive — Tablet ===== */
@media (max-width: 768px) {
  .navbar {
    top: 20px;
    right: 20px;
  }

  .menu-toggle {
    display: block;
    position: fixed;
  }

  .nav-list {
    position: fixed;
    top: 70px;
    right: 20px;
    flex-direction: column;
    background: rgba(40, 80, 130, 0.92);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 20px;
    display: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  }

  .nav-list.active {
    display: flex;
  }

  .hero-title {
    font-size: 42px;
    letter-spacing: 2px;
  }

  .hero-sub {
    font-size: 12px;
    letter-spacing: 4px;
  }

  .education-word {
    font-size: 22px;
    padding-top: 80px;
  }

  /* Stack timeline single-column */
  .container {
    width: 100%;
    left: 0 !important;
    padding: 40px 20px 40px 50px;
  }

  .text-box {
    padding: 30px 25px;
  }

  .card-logo-img {
    width: 50px;
    height: 50px;
    border-radius: 12px;
  }

  .card-meta h2 {
    font-size: 19px;
  }

  .cursor-ring {
    display: none;
  }
}

/* ===== Responsive — Mobile ===== */
@media (max-width: 480px) {
  .hero-title {
    font-size: 32px;
  }

  .education-word h2 {
    font-size: 20px;
  }

  .container {
    padding: 30px 15px 30px 40px;
  }

  .text-box {
    padding: 25px 20px;
    border-radius: 16px;
    font-size: 14px;
  }

  .card-meta h2 {
    font-size: 17px;
  }

  .navbar {
    top: 15px;
    right: 15px;
  }
}