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

:root {
  --bg-color: #ffffff;
  --text-color: #111111;
  --card-color: #f5f5f5;
  --accent: #474af0;
  --accent-soft: rgba(71, 74, 240, 0.1);
}

#theme-toggle {
  position: fixed;
  top: 37px;
  right: 40px;
  z-index: 2000;

  width: 45px;
  height: 45px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: var(--card-color);
  color: var(--text-color);

  border: none;
  border-radius: 50%;
  cursor: pointer;

  font-size: 18px;

  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);

  transition: all 0.3s ease;
}

#theme-toggle:hover {
  transform: scale(1.1);
}

@media (max-width: 768px) {
  #theme-toggle {
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  #theme-toggle {
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    font-size: 14px;
  }
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
}

header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
}

.dark-mode {
  --bg-color: #0d1117;
  --text-color: #ffffff;
  --card-color: #161b22;
  --accent-soft: rgba(71, 74, 240, 0.18);
}

.header-list {
  margin: 15px 20px;
  background: var(--card-color);
}

.div-list {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 0;
}

.ul-list {
  list-style: none;
  display: flex;
  gap: 3rem;
  background-color: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  padding: 10px 25px;
  border-radius: 25px;
}

.ul-list li {
  display: flex;
  align-items: center;
  gap: 6px;
  border-radius: 25px;
  transition: 0.3s;
}

.ul-list li a {
  font-family: "Montserrat", sans-serif;
  text-decoration: none;
  color: black;
}

.ul-list li.active {
  background-color: black;
  padding: 10px 15px;
}

.ul-list li.active a,
.ul-list li.active i {
  color: white;
}

/* fine header  */

.home {
  margin: 160px 200px;
}

.home-container {
  display: flex;
  gap: 6rem;
}

.home-p {
  color: var(--text-color);
  background-color: rgba(128, 128, 128, 0.214);
  display: inline-block;
  border-radius: 25px;
  padding: 5px 10px;
  margin-bottom: 30px;
}

.home-s {
  font-weight: bold;
  color: green;
}

.info-home h1 {
  font-size: 70px;
  font-family: "Raleway", sans-serif;
  margin-bottom: 20px;
}

.info-home h3 {
  font-size: 40px;
  font-family: "Playfair Display", serif;
  margin-bottom: 20px;
}

.info-p {
  color: var(--text-color);
  color: #888;
  font-family: "Roboto", sans-serif;
  padding-bottom: 20px;
}

.info-p p {
  padding-bottom: 5px;
}

.info-p2 {
  display: flex;
  gap: 1rem;
  color: var(--text-color);
  font-size: 14px;
  padding-bottom: 20px;
}

.btnn {
  display: flex;
  gap: 1rem;
  padding-bottom: 30px;
}

.btn-home1 {
  background-color: #000000;
  color: rgb(255, 255, 255);
  border: none;
  border-radius: 10px;
  padding: 10px 10px;
  cursor: pointer;
}

.btn-home2 {
  background-color: transparent;
  border: 2px solid var(--text-color);
  color: var(--text-color);
  border-radius: 10px;
  padding: 10px 10px;
  cursor: pointer;
  transition: 0.4s;
}

.btn-home2:hover {
  background-color: #000000;
  color: #fff;
}

hr {
  width: 90%;
  font-weight: bold;
  color: gray;
}

.hhr {
  padding-bottom: 30px;
}

.follow {
  display: flex;
  gap: 1rem;
}

.follow ul {
  display: flex;
  gap: 2rem;
  font-size: 20px;
}

.follow ul li {
  list-style: none;
}

.follow ul a {
  text-decoration: none;
  color: var(--text-color);
}

.home img {
  width: 400px;
  border-radius: 10px;
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: #474af0;
  color: #fff;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s ease;
  z-index: 2000;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* fine home  */

.about {
  margin: 160px 200px;
}

.about p {
  padding-bottom: 30px;
  font-size: 13px;
  color: var(--text-color);
  color: #888;
}

.about h1 {
  font-family: "Open Sans", sans-serif;
}

.title {
  padding-bottom: 20px;
}

.about .hrrr {
  width: 30%;
  padding-bottom: 40px;
}

.info-about {
  display: flex;
  flex-direction: column;
}

.about-container {
  display: flex;
  gap: 60px;
  align-items: flex-start;
  justify-content: space-between;
}

.about img {
  width: 100%;
  max-width: 380px;
  height: auto;
  border-radius: 15px;
  border: 1px solid black;
  object-fit: cover;

  position: static;
  /* remove shifting */
  display: block;
  margin-top: -61px;
}

.about h2 {
  padding-bottom: 30px;
}

.card {
  display: flex;
  gap: 2rem;
}

.c1 {
  display: flex;
  align-content: center;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  border: 2px solid black;
  padding: 5px 20px;
  border-radius: 10px;
  transition: all 0.3s ease;
}

#languages-card {
  cursor: pointer;
}

#projects-card {
  cursor: pointer;
}

.c1 h3 {
  padding-top: 10px;
  padding-bottom: 10px;
}

.c1:hover {
  transform: translateY(-6px) scale(1.03);
  border-color: #ff3333;
  background-color: var(--card-color);
  color: var(--text-color);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  cursor: pointer;
}

/* Modal Background */
.edu-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  justify-content: center;
  align-items: center;
  z-index: 3000;
}

/* Modal Box */
.edu-content {
  background: rgba(22, 27, 34, 0.9);
  color: #fff;
  padding: 40px 30px;
  border-radius: 16px;
  width: 90%;
  max-width: 600px;
  position: relative;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  animation: fadeIn 0.4s ease;
}

/* Title */
.edu-content h2 {
  text-align: center;
  margin-bottom: 25px;
  font-size: 24px;
  font-weight: 600;
}

.content h3 {
  font-size: 18px;
  margin-bottom: 5px;
}

.content .year {
  font-size: 13px;
  color: #9ca3af;
  display: block;
  margin-bottom: 6px;
}

.content p {
  font-size: 14px;
  color: #d1d5db;
  line-height: 1.5;
}

/* Close button */
.close-edu {
  position: absolute;
  right: 20px;
  top: 15px;
  font-size: 22px;
  cursor: pointer;
  transition: 0.3s;
}

.close-edu:hover {
  color: #ff4d4d;
}

/* Timeline */
.timeline {
  position: relative;
  margin-top: 20px;
  padding-left: 30px;
}

/* Timeline items */
.timeline-item {
  position: relative;
  margin-bottom: 30px;
  padding-left: 20px;
}

.timeline-item:hover .circle {
  transform: scale(1.3);
  box-shadow: 0 0 0 6px rgba(71, 74, 240, 0.18);
  background: #474af0;
}

/* Circle */
.timeline-item .circle {
  position: absolute;
  left: -28px;
  top: 18px;
  width: 16px;
  height: 16px;
  background: #fff;
  border: 3px solid #474af0;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(71, 74, 240, 0.12);
  transition: transform 0.3s, box-shadow 0.3s;
  z-index: 1;
}

/* Content */
.timeline-item .content {
  background: rgba(255, 255, 255, 0.05);
  padding: 12px 15px;
  border-radius: 10px;
  transition: 0.3s;
}

.timeline-item .timeline-content:hover {
  transform: translateX(6px) scale(1.02);
  box-shadow: 0 10px 25px rgba(99, 102, 241, 0.3);
}

.timeline-item h3 {
  margin-bottom: 5px;
  font-size: 16px;
}

.timeline-item p {
  font-size: 14px;
  color: #888;
}

/* Meta info (location + school) */
.edu-meta {
  display: flex;
  gap: 15px;
  font-size: 12px;
  color: #474af0;
  margin-bottom: 8px;
}

/* Badge (CGPA / Percentage) */
.badge {
  display: inline-block;
  margin-top: 10px;
  padding: 4px 10px;
  font-size: 12px;
  border-radius: 20px;
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  border: 1px solid #6366f1;
}

/* Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Animated vertical line */
.timeline::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 0;
  width: 3px;
  height: 0;
  background: linear-gradient(to bottom, #6366f1, #8b5cf6);
  animation: growLine 1.5s ease forwards;
}

@keyframes growLine {
  to {
    height: 100%;
  }
}

.circle {
  width: 14px;
  height: 14px;
  background: #6366f1;
  border-radius: 50%;
  position: absolute;
  left: -22px;
  top: 10px;
  box-shadow: 0 0 10px #6366f1;
}

/* Card styling */
.timeline-content {
  background: rgba(255, 255, 255, 0.05);
  padding: 15px 18px;
  border-radius: 10px;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

/* 🔥 Hover effect */
.timeline-content:hover {
  transform: translateY(-5px) scale(1.02);
  border: 1px solid #6366f1;
  box-shadow: 0 10px 25px rgba(99, 102, 241, 0.3);
}

/* Text */
.content h3 {
  font-size: 16px;
  margin-bottom: 5px;
}

.content h3 i {
  margin-right: 8px;
  color: #6366f1;
}

.year {
  font-size: 12px;
  color: #474af0;
  display: block;
  margin-bottom: 6px;
}

.year-current {
  font-size: 12px;
  color: #16a34a;
  display: block;
  margin-bottom: 6px;
}

.content p {
  font-size: 14px;
  color: #d1d5db;
}

.project {
  margin: 160px 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.project p {
  padding-bottom: 20px;
  font-size: 13px;
  color: var(--text-color);
}

.project h1 {
  font-family: "Open Sans", sans-serif;
  padding-bottom: 10px;
}

.project hr {
  width: 10%;
}

.info-pro {
  padding-top: 20px;
}

.info-pro p {
  padding-bottom: 10px;
  color: #888;
}

.projects-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  max-width: 1100px;
  margin: auto;
  align-items: stretch;
}

.project-card {
  background: var(--card-color);
  padding: 20px;
  border-radius: 16px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);

  display: flex;
  flex-direction: column;
  gap: 10px;

  /* height: auto; */
  min-height: 480px;
  transition: 0.3s ease;
}

.project-card:hover {
  transform: translateY(-6px);
}

.project-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  margin-bottom: 15px;
  object-fit: contain;
  background: #000;
  image-rendering: auto;
  display: block;
}

.project-card h3 {
  color: var(--text-color);
  margin-bottom: 8px;
}

.project-card p {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 15px;
  /* flex-grow: 1; */
}

.project-card .skills {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, max-content));
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  justify-content: center;
  width: 100%;
  margin-top: 10px;
  align-items: flex-start;
  margin-left: -10px;
}

.project-card .skills span {
  display: inline-flex;
  background: rgba(71, 74, 240, 0.08);
  color: #474af0;
  text-decoration: none;
  font-size: 0.8rem;
  padding: 5px 10px;
  border-radius: 6px;
  margin: 3px;
  transition: background 0.3s;

  align-items: center;
  justify-content: center;
  white-space: nowrap;
  /* margin-top: auto; */

  width: auto;
  /* min-width: 80px; */
  text-align: center;
}

.project-card .skills a:hover {
  background: #c7d2fe;
}

.project-card .btns {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: auto;
}

.btn {
  background: #1e40af;
  color: white;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 25px;
  font-size: 0.9rem;
  transition: 0.3s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn:hover {
  background: #2563eb;
  border-radius: 25px;

}

.more-projects-wrapper {
  width: 100%;
  margin-top: 60px;
}

.line {
  max-width: 1100px;
  height: 1px;
  margin: 0 auto 25px auto;
  background: rgba(255, 255, 255, 0.2);
}

.more-projects {
  max-width: 1100px;
  margin: 50px auto 0 auto;
  display: flex;
  justify-content: flex-end;
}

.more-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;

  padding: 12px 24px;
  border-radius: 30px;

  background: var(--card-color);
  color: var(--text-color);

  text-decoration: none;
  font-weight: 600;
  font-size: 15px;

  border: 2px solid var(--text-color);

  transition: all 0.3s ease;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.3);
}

.more-btn i {
  font-size: 16px;
}

.more-btn:hover {
  background: #1e40af;
  color: #fff;
  border-color: #1e40af;
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.skills {
  margin: 160px 200px;
  text-align: center;
}

.skills p {
  padding-bottom: 20px;
  font-size: 13px;
  color: var(--text-color);
}

.skills h1 {
  font-family: "Open Sans", sans-serif;
  padding-bottom: 10px;
}

.skill-box {
  background: var(--card-color);
  padding: 20px;
  border-radius: 12px;
  border: 1px solid var(--text-color);
  transition: 0.3s;
}

.skill-box:hover {
  transform: translateY(-6px);
}

.skills-container {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 25px;
}

.skills-line {
  width: 10%;
  margin: 10px auto 30px auto;
}

.skill-card {
  background: var(--card-color);
  color: var(--text-color);
  border-radius: 18px;
  padding: 25px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.08);

  transition: all 0.3s ease;
  position: relative;
}

.dark-mode .skill-card {
  background: linear-gradient(145deg, #0f172a, #020617);
  color: #e5e7eb;
}

/* Glow effect */
.icon-item::after {
  content: attr(data-name);
  position: absolute;
  top: 120%;
  left: 50%;
  transform: translateX(-50%) scale(0.8);
  background: var(--card-color);
  color: var(--text-color);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 11px;
  padding: 6px 10px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
}

.dark-mode .icon-item::after {
  background: #111;
  color: #fff;
}

.icon-item:hover::before {
  opacity: 1;
}

.skill-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 10px 40px rgba(99, 102, 241, 0.25);
}

/* Title */
.skill-card h3 {
  margin-bottom: 20px;
  font-size: 18px;
  color: var(--text-color);
}

/* Icons grid */
.icons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(45px, 1fr));
  gap: 18px;
  justify-items: center;
}

/* Icons */
.icons img {
  width: 42px;
  height: 42px;
  transition: 0.3s;
}

.icons img:hover {
  transform: scale(1.2) rotate(5deg);
}

/* fix overflow for tooltip */
.skill-card {
  overflow: visible;
}

/* icon wrapper */
.icon-item {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* icon styling */
.icon-item img {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  transition: all 0.3s ease;
}

.icon-item:active img {
  transform: scale(1.15);
}

/* 🔥 glow hover */
.icon-item:hover img {
  transform: scale(1.2) rotate(5deg);
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.9),
    0 0 30px rgba(99, 102, 241, 0.5);
}

/* tooltip */
.icon-item::after {
  content: attr(data-name);
  position: absolute;
  top: 120%;
  /* ⬅️ THIS creates natural gap */

  left: 50%;
  transform: translateX(-50%) scale(0.8);

  background: #111;
  color: #fff;
  font-size: 11px;
  padding: 6px 10px;
  border-radius: 6px;

  white-space: nowrap;
  opacity: 0;
  pointer-events: none;

  transition: all 0.3s ease;
}

/* show tooltip */
.icon-item:hover::after {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

.experience {
  margin: 80px 200px;
  text-align: center;
}

.experience>.exp-label {
  font-size: 13px;
  letter-spacing: 3px;
  color: #474af0;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 12px;
  display: block;
}

.experience>h1 {
  font-family: 'Open Sans', sans-serif;
  font-size: clamp(26px, 4vw, 42px);
  font-weight: 700;
  margin-bottom: 12px;
}

.exp-divider {
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, #474af0, #8b8df8);
  border-radius: 4px;
  margin: 0 auto 50px auto;
  position: relative;
}

.exp-divider::after {
  content: '';
  position: absolute;
  right: -10px;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #474af0;
}

/* ── Tab switcher ── */
.exp-tabs {
  display: inline-flex;
  background: var(--card-color);
  border-radius: 50px;
  padding: 6px;
  gap: 4px;
  margin-bottom: 56px;
  box-shadow: 0 2px 12px rgba(71, 74, 240, 0.1);
  position: relative;
}

.exp-tab-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 26px;
  border: none;
  border-radius: 50px;
  background: transparent;
  color: var(--text-color);
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  opacity: 0.55;
  z-index: 1;
}

.exp-tab-btn i {
  font-size: 15px;
  transition: transform 0.3s;
}

.exp-tab-btn.active {
  background: #474af0;
  color: #fff;
  opacity: 1;
  box-shadow: 0 6px 20px rgba(71, 74, 240, 0.4);
}

.exp-tab-btn.active i {
  transform: scale(1.15);
}

.exp-tab-btn:not(.active):hover {
  opacity: 0.85;
}

/* ── Tab panels ── */
.exp-panel {
  display: none;
  animation: expFadeUp 0.5s ease forwards;
}

.exp-panel.active {
  display: block;
}

@keyframes expFadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Timeline container ── */
.exp-timeline {
  position: relative;
  max-width: 820px;
  margin: 0 auto;
  padding-left: 36px;
  text-align: left;
}

/* Vertical line */
.exp-timeline::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 8px;
  width: 3px;
  height: calc(100% - 8px);
  background: linear-gradient(to bottom, #474af0 0%, rgba(71, 74, 240, 0.08) 100%);
  border-radius: 3px;
}

/* ── Timeline item ── */
.exp-item {
  position: relative;
  margin-bottom: 36px;
  opacity: 0;
  transform: translateX(-20px);
  animation: slideInLeft 0.5s ease forwards;
}

.exp-item:nth-child(1) {
  animation-delay: 0.05s;
}

.exp-item:nth-child(2) {
  animation-delay: 0.15s;
}

.exp-item:nth-child(3) {
  animation-delay: 0.25s;
}

.exp-item:nth-child(4) {
  animation-delay: 0.35s;
}

@keyframes slideInLeft {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Dot on line */
.exp-dot {
  position: absolute;
  left: -30.5px;
  top: 18px;
  width: 16px;
  height: 16px;
  background: #fff;
  border: 3px solid #474af0;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(71, 74, 240, 0.12);
  transition: transform 0.3s, box-shadow 0.3s;
  z-index: 1;
}

.exp-item:hover .exp-dot {
  transform: scale(1.3);
  box-shadow: 0 0 0 6px rgba(71, 74, 240, 0.18);
  background: #474af0;
}

/* Card */
.exp-card {
  background: var(--card-color);
  border-radius: 18px;
  padding: 26px 28px;
  border: 1.5px solid transparent;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.exp-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(71, 74, 240, 0.06), transparent);
  opacity: 0;
  transition: opacity 0.35s;
}

.exp-item:hover .exp-card {
  border-color: rgba(71, 74, 240, 0.35);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(71, 74, 240, 0.15);
}

.exp-item:hover .exp-card::before {
  opacity: 1;
}

/* Card header */
.exp-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.exp-card-left {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.exp-icon-wrap {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  background: rgba(71, 74, 240, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #474af0;
  transition: background 0.3s;
}

.exp-item:hover .exp-icon-wrap {
  background: #474af0;
  color: #fff;
}

.exp-role {
  font-family: 'Montserrat', sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 3px;
}

.exp-company {
  font-size: 13px;
  font-weight: 600;
  color: #474af0;
  display: flex;
  align-items: center;
  gap: 5px;
}

.exp-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.badge-date {
  background: rgba(71, 74, 240, 0.1);
  color: #474af0;
}

.badge-current {
  background: rgba(34, 197, 94, 0.12);
  color: #16a34a;
}

.dark-mode .badge-current {
  color: #4ade80;
  background: rgba(74, 222, 128, 0.12);
}

.exp-desc {
  font-size: 14px;
  color: #666;
  line-height: 1.75;
  margin-bottom: 16px;
}

.dark-mode .exp-desc {
  color: #9ca3af;
}

/* Tags */
.exp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.exp-tag {
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(71, 74, 240, 0.08);
  color: #474af0;
  border: 1px solid rgba(71, 74, 240, 0.2);
  transition: background 0.2s;
}

.exp-item:hover .exp-tag {
  background: rgba(71, 74, 240, 0.15);
}

/* Achievements list */
.exp-achievements {
  margin: 12px 0 16px;
  padding-left: 20px;
}

.exp-achievements li {
  font-size: 14px;
  color: #666;
  line-height: 1.8;
  list-style: none;
  position: relative;
  padding-left: 4px;
}

.dark-mode .exp-achievements li {
  color: #9ca3af;
}

.exp-achievements li::before {
  content: '▸';
  position: absolute;
  left: -16px;
  color: #474af0;
  font-size: 12px;
}

/* Empty state */
.exp-empty {
  text-align: center;
  padding: 60px 20px;
  max-width: 420px;
  margin: 0 auto;
}

.exp-empty-icon {
  font-size: 52px;
  margin-bottom: 20px;
  display: block;
  opacity: 0.25;
}

.exp-empty h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
}

.exp-empty p {
  font-size: 14px;
  color: #888;
  line-height: 1.7;
}

/* ── Responsive ── */
@media (max-width: 1100px) {
  .experience {
    margin: 80px 60px;
  }
}

@media (max-width: 768px) {
  .experience {
    margin: 60px 20px;
  }

  .exp-tabs {
    width: 100%;
    border-radius: 16px;
    flex-direction: column;
    padding: 8px;
  }

  .exp-tab-btn {
    width: 100%;
    justify-content: center;
    border-radius: 12px;
  }

  .exp-timeline {
    padding-left: 28px;
  }

  .exp-dot {
    left: -21.5px;
    width: 14px;
    height: 14px;
  }

  .exp-card {
    padding: 18px 16px;
  }

  .exp-card-header {
    flex-direction: column;
    gap: 10px;
  }

  .exp-badge {
    align-self: flex-start;
  }

  .exp-role {
    font-size: 15px;
  }
}

@media (max-width: 480px) {
  .exp-tabs {
    padding: 6px;
  }

  .exp-tab-btn {
    padding: 10px 16px;
    font-size: 13px;
  }

  .exp-card-left {
    flex-direction: column;
    gap: 10px;
  }

  .exp-icon-wrap {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }
}

.achievements-section {
  margin: 100px 200px;
  text-align: center;
}

/* Section header */
.ach-label {
  display: block;
  font-size: 13px;
  letter-spacing: 3px;
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.achievements-section h1 {
  font-family: 'Open Sans', sans-serif;
  font-size: clamp(26px, 4vw, 42px);
  font-weight: 700;
  margin-bottom: 12px;
}

.ach-divider {
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), #8b8df8);
  border-radius: 4px;
  margin: 0 auto 14px;
  position: relative;
}

.ach-divider::after {
  content: '';
  position: absolute;
  right: -10px;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.ach-subtitle {
  font-size: 15px;
  color: #888;
  margin-bottom: 60px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

/* ── Achievement Cards Grid ── */
.ach-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 22px;
  margin-bottom: 70px;
  text-align: left;
}

.ach-card {
  background: var(--card-color);
  border-radius: 20px;
  padding: 26px 24px;
  border: 1.5px solid transparent;
  position: relative;
  overflow: hidden;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: default;
}

/* top accent bar */
.ach-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), #8b8df8);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 20px 20px 0 0;
}

.ach-card:hover::before {
  transform: scaleX(1);
}

.ach-card:hover {
  border-color: rgba(71, 74, 240, 0.3);
  transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(71, 74, 240, 0.14);
}

.ach-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}

.ach-medal {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
  transition: transform 0.3s;
}

.ach-card:hover .ach-medal {
  transform: rotate(-8deg) scale(1.1);
}

.medal-gold {
  background: linear-gradient(135deg, #fff8e1, #ffd54f22);
  border: 1.5px solid #ffc10740;
}

.medal-blue {
  background: var(--accent-soft);
  border: 1.5px solid rgba(71, 74, 240, 0.2);
}

.medal-green {
  background: rgba(34, 197, 94, 0.1);
  border: 1.5px solid rgba(34, 197, 94, 0.2);
}

.medal-purple {
  background: rgba(168, 85, 247, 0.1);
  border: 1.5px solid rgba(168, 85, 247, 0.2);
}

.medal-red {
  background: rgba(239, 68, 68, 0.1);
  border: 1.5px solid rgba(239, 68, 68, 0.2);
}

.medal-teal {
  background: rgba(20, 184, 166, 0.1);
  border: 1.5px solid rgba(20, 184, 166, 0.2);
}

.ach-year {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 4px 10px;
  border-radius: 50px;
  background: var(--accent-soft);
  color: var(--accent);
}

.ach-card-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-color);
  line-height: 1.4;
}

.ach-card-org {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.ach-card-desc {
  font-size: 13px;
  color: #777;
  line-height: 1.7;
}

.dark-mode .ach-card-desc {
  color: #9ca3af;
}

/* ── Stats Counter Row ── */
.ach-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  margin-bottom: 70px;
}

.ach-stat-box {
  background: var(--card-color);
  border-radius: 16px;
  padding: 24px 16px;
  border: 1.5px solid transparent;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.ach-stat-box::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), #8b8df8);
  transform: scaleX(0);
  transition: transform 0.4s;
}

.ach-stat-box:hover::after {
  transform: scaleX(1);
}

.ach-stat-box:hover {
  border-color: rgba(71, 74, 240, 0.25);
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(71, 74, 240, 0.12);
}

.ach-stat-icon {
  font-size: 22px;
  margin-bottom: 12px;
  display: block;
  transition: transform 0.3s;
}

.ach-stat-box:hover .ach-stat-icon {
  transform: scale(1.15);
}

.ach-stat-num {
  font-family: 'Montserrat', sans-serif;
  font-size: 28px;
  font-weight: 900;
  color: var(--accent);
  display: block;
  margin-bottom: 4px;
  line-height: 1;
}

.ach-stat-label {
  font-size: 12px;
  color: #888;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* ── GitHub Stats Section ── */
.ach-github-wrap {
  margin-bottom: 70px;
  text-align: left;
}

.ach-section-label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 22px;
  letter-spacing: 0.5px;
}

.ach-section-label i {
  font-size: 18px;
  color: var(--accent);
}

.ach-section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(71, 74, 240, 0.3), transparent);
}

.github-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.github-stat-img {
  width: 100%;
  border-radius: 14px;
  border: 1.5px solid transparent;
  transition: all 0.3s;
  display: block;
  background: var(--card-color);
}

.github-stat-img:hover {
  border-color: rgba(71, 74, 240, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(71, 74, 240, 0.12);
}

.github-streak-img {
  width: 100%;
  border-radius: 14px;
  border: 1.5px solid transparent;
  transition: all 0.3s;
  display: block;
  grid-column: 1 / -1;
  background: var(--card-color);
}

.github-streak-img:hover {
  border-color: rgba(71, 74, 240, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(71, 74, 240, 0.12);
}

/* ── Contribution Graph ── */
.contrib-wrap {
  margin-bottom: 70px;
  text-align: left;
}

.contrib-card {
  background: var(--card-color);
  border-radius: 20px;
  padding: 28px 28px 22px;
  border: 1.5px solid transparent;
  transition: border-color 0.3s, box-shadow 0.3s;
  overflow: hidden;
  position: relative;
}

.contrib-card:hover {
  border-color: rgba(71, 74, 240, 0.25);
  box-shadow: 0 12px 40px rgba(71, 74, 240, 0.1);
}

/* top shimmer line */
.contrib-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #474af0, #8b8df8, #474af0);
  background-size: 200% 100%;
  animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

.contrib-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.contrib-card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Montserrat', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-color);
}

.contrib-card-title i {
  color: var(--accent);
  font-size: 16px;
}

.contrib-live-dot {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: #22c55e;
  letter-spacing: 0.5px;
}

.contrib-live-dot::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5);
  animation: livePing 1.5s ease infinite;
}

@keyframes livePing {
  0% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5);
  }

  70% {
    box-shadow: 0 0 0 8px rgba(34, 197, 94, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}

/* The graph image itself */
.contrib-graph-img {
  width: 100%;
  border-radius: 10px;
  display: block;
  transition: transform 0.3s;
}

.contrib-graph-img:hover {
  transform: scale(1.01);
}

/* Activity graph below */
.activity-graph-img {
  width: 100%;
  border-radius: 12px;
  display: block;
  margin-top: 16px;
  transition: transform 0.3s;
}

.activity-graph-img:hover {
  transform: scale(1.005);
}

/* Legend row */
.contrib-legend {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 14px;
  font-size: 11px;
  color: #888;
  font-weight: 600;
}

.legend-box {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  display: inline-block;
}

/* Dark-mode swap for the ghchart (light bg image) */
.contrib-graph-light {
  display: block;
}

.contrib-graph-dark {
  display: none;
}

.dark-mode .contrib-graph-light {
  display: none;
}

.dark-mode .contrib-graph-dark {
  display: block;
}

@media (max-width: 768px) {
  .contrib-card {
    padding: 18px 14px 16px;
  }
}

/* ── Coding Profiles ── */
.profiles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.profile-card {
  background: var(--card-color);
  border-radius: 20px;
  padding: 26px 22px;
  border: 1.5px solid transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  color: var(--text-color);
  position: relative;
  overflow: hidden;
}

.profile-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, var(--profile-glow, rgba(71, 74, 240, 0.08)), transparent 70%);
  opacity: 0;
  transition: opacity 0.35s;
}

.profile-card:hover::before {
  opacity: 1;
}

.profile-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 50px var(--profile-shadow, rgba(71, 74, 240, 0.18));
  border-color: var(--profile-border, rgba(71, 74, 240, 0.35));
}

/* Per-platform colors */
.profile-github {
  --profile-glow: rgba(71, 74, 240, 0.10);
  --profile-shadow: rgba(71, 74, 240, 0.18);
  --profile-border: rgba(71, 74, 240, 0.35);
}

.profile-kaggle {
  --profile-glow: rgba(32, 182, 235, 0.1);
  --profile-shadow: rgba(32, 182, 235, 0.18);
  --profile-border: rgba(32, 182, 235, 0.3);
}

.profile-gfg {
  --profile-glow: rgba(43, 179, 79, 0.1);
  --profile-shadow: rgba(43, 179, 79, 0.18);
  --profile-border: rgba(43, 179, 79, 0.3);
}

.profile-leetcode {
  --profile-glow: rgba(255, 161, 22, 0.1);
  --profile-shadow: rgba(255, 161, 22, 0.18);
  --profile-border: rgba(255, 161, 22, 0.3);
}

.profile-logo-wrap {
  width: 62px;
  height: 62px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  flex-shrink: 0;
  transition: transform 0.3s;
}

.profile-card:hover .profile-logo-wrap {
  transform: rotate(-6deg) scale(1.1);
}

.logo-github {
  background: #24292e;
  color: #fff;
}

.logo-kaggle {
  background: #20b6eb22;
  color: #20b6eb;
  border: 1.5px solid #20b6eb33;
}

.logo-gfg {
  background: #2bb34f18;
  color: #2bb34f;
  border: 1.5px solid #2bb34f30;
}

.logo-leetcode {
  background: #ffa11618;
  color: #ffa116;
  border: 1.5px solid #ffa11630;
}

.profile-name {
  font-family: 'Montserrat', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-color);
}

.profile-handle {
  font-size: 12px;
  color: #888;
  font-weight: 600;
}

.profile-stats {
  display: flex;
  gap: 16px;
  margin: 4px 0;
}

.profile-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.profile-stat-val {
  font-family: 'Montserrat', sans-serif;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.1;
}

.profile-stat-key {
  font-size: 10px;
  color: #888;
  font-weight: 600;
  letter-spacing: 0.3px;
  margin-top: 2px;
}

.profile-divider {
  width: 40px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), #8b8df8);
  border-radius: 2px;
}

.profile-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 20px;
    border-radius: 50px;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.3px;
    transition: all 0.25s ease;
    margin-top: 4px;

    /* Normal state */
    background: color-mix(
        in srgb,
        var(--profile-color) 10%,
        transparent
    );

    color: var(--profile-color);

    border: 1px solid color-mix(
        in srgb,
        var(--profile-color) 25%,
        transparent
    );
}

/* Hover state */
.profile-card:hover .profile-btn {
    background: var(--profile-color);
    color: #fff;
    border-color: var(--profile-color);

    box-shadow: 0 6px 16px color-mix(
        in srgb,
        var(--profile-color) 35%,
        transparent
    );

    transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 1100px) {
  .achievements-section {
    margin: 80px 60px;
  }
}

@media (max-width: 768px) {
  .achievements-section {
    margin: 60px 20px;
  }

  .github-stats-grid {
    grid-template-columns: 1fr;
  }

  .github-streak-img {
    grid-column: unset;
  }

  .ach-stats-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .profiles-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .profiles-grid {
    grid-template-columns: 1fr;
  }

  .ach-stats-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .ach-grid {
    grid-template-columns: 1fr;
  }
}

/* Entrance animations */
.reveal-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* counter animation */
@keyframes countUp {
  from {
    opacity: 0;
    transform: scale(0.7);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.ach-stat-num {
  animation: countUp 0.5s ease forwards;
}

/* View Certificate button on each card */
.ach-card {
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.ach-cert-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: auto;
  padding: 14px;
  border-radius: 50px;
  border: 1.5px solid rgba(71, 74, 240, 0.25);
  background: var(--accent-soft);
  color: var(--accent);
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s;
  width: 100%;
  justify-content: center;
}

.ach-cert-btn i {
  font-size: 13px;
  transition: transform 0.3s;
}

.ach-card:hover .ach-cert-btn {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 6px 18px rgba(71, 74, 240, 0.35);
}

.ach-card:hover .ach-cert-btn i {
  transform: scale(1.2) rotate(-5deg);
}

/* project card — different CTA color */
.ach-cert-btn.btn-project {
  background: rgba(34, 197, 94, 0.08);
  color: #16a34a;
  border-color: rgba(34, 197, 94, 0.25);
}

.ach-card:hover .ach-cert-btn.btn-project {
  background: #16a34a;
  color: #fff;
  border-color: #16a34a;
  box-shadow: 0 6px 18px rgba(22, 163, 74, 0.3);
}

.dark-mode .ach-cert-btn.btn-project {
  color: #4ade80;
}

/* ── Modal Overlay ── */
#cert-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: modalFadeIn 0.25s ease forwards;
}

#cert-modal.open {
  display: flex;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* ── Modal Box ── */
.cert-modal-box {
  background: var(--bg-color);
  border-radius: 24px;
  width: 100%;
  max-width: 820px;
  max-height: 92vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(71, 74, 240, 0.2);
  animation: modalSlideUp 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes modalSlideUp {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ── Modal Header ── */
.cert-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 18px;
  border-bottom: 1px solid rgba(71, 74, 240, 0.12);
  gap: 14px;
  flex-shrink: 0;
}

.cert-modal-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.cert-modal-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.cert-modal-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 2px;
}

.cert-modal-org {
  font-size: 12px;
  color: #888;
  font-weight: 600;
}

.cert-modal-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cert-modal-year {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 4px 12px;
  border-radius: 50px;
  background: var(--accent-soft);
  color: var(--accent);
}

.cert-close-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1.5px solid rgba(71, 74, 240, 0.2);
  background: transparent;
  color: var(--text-color);
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s;
}

.cert-close-btn:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  transform: rotate(90deg);
}

/* ── Modal Body ── */
.cert-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

/* Certificate image frame */
.cert-frame {
  width: 100%;
  background: var(--card-color);
  border-radius: 16px;
  overflow: hidden;
  border: 1.5px solid rgba(71, 74, 240, 0.15);
  position: relative;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cert-frame img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
  transition: transform 0.3s;
}

.cert-frame img:hover {
  transform: scale(1.015);
}

/* Placeholder when no cert image yet */
.cert-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 60px 40px;
  text-align: center;
  width: 100%;
}

.cert-placeholder-icon {
  width: 70px;
  height: 70px;
  border-radius: 20px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
}

.cert-placeholder h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-color);
}

.cert-placeholder p {
  font-size: 13px;
  color: #888;
  line-height: 1.7;
  max-width: 320px;
}

.cert-placeholder-hint {
  font-size: 12px;
  color: var(--accent);
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  background: var(--accent-soft);
  padding: 6px 16px;
  border-radius: 50px;
  border: 1px dashed rgba(71, 74, 240, 0.3);
}

/* Modal footer action buttons */
.cert-modal-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 18px 24px;
  border-top: 1px solid rgba(71, 74, 240, 0.1);
  flex-shrink: 0;
  flex-wrap: wrap;
}

.cert-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 50px;
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.25s;
  border: none;
}

.cert-action-btn.primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 14px rgba(71, 74, 240, 0.35);
}

.cert-action-btn.primary:hover {
  background: #3436d4;
  box-shadow: 0 6px 20px rgba(71, 74, 240, 0.45);
  transform: translateY(-1px);
}

.cert-action-btn.secondary {
  background: var(--card-color);
  color: var(--text-color);
  border: 1.5px solid rgba(71, 74, 240, 0.2);
}

.cert-action-btn.secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

/* Scrollbar styling inside modal */
.cert-modal-body::-webkit-scrollbar {
  width: 6px;
}

.cert-modal-body::-webkit-scrollbar-track {
  background: transparent;
}

.cert-modal-body::-webkit-scrollbar-thumb {
  background: rgba(71, 74, 240, 0.3);
  border-radius: 3px;
}

/* PDF iframe inside certificate modal */
.cert-pdf-iframe {
  width: 100%;
  height: 70vh;
  border: none;
  border-radius: 14px;
  display: block;
}

@media (max-width: 600px) {
  .cert-pdf-iframe {
    height: 55vh;
  }
}

/* Responsive */
@media (max-width: 600px) {
  .cert-modal-box {
    border-radius: 16px;
  }

  .cert-modal-header {
    padding: 16px 16px 14px;
  }

  .cert-modal-body {
    padding: 16px;
  }

  .cert-modal-footer {
    padding: 14px 16px;
  }

  .cert-modal-title {
    font-size: 14px;
  }

  .cert-modal-header-right {
    gap: 6px;
  }
}


.contact {
  margin: 160px 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.contact p {
  padding-bottom: 20px;
  font-size: 13px;
  color: var(--text-color);
}

.contact h1 {
  font-family: "Open Sans", sans-serif;
  padding-bottom: 10px;
}

.contact hr {
  width: 10%;
}

.contact-content {
  padding-top: 50px;
  display: flex;
  gap: 50px;
  flex-wrap: wrap;
  justify-content: center;
}

.contact-info {
  flex: 1;
  min-width: 300px;
}

.contact-info p {
  font-size: 16px;
  margin-bottom: 25px;
  color: #888;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 20px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  color: var(--text-color);
}

.contact-item i {
  font-size: 20px;
  color: #474af0;
}

.social-links {
  display: flex;
  gap: 15px;
}

.social-link {
  width: 50px;
  height: 50px;
  background: #f0f0f0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #222;
  font-size: 20px;
  transition: all 0.3s ease;
}

.social-link:hover {
  transform: translateY(-5px);
  color: #fff;
}

.social-link[href*="github"]:hover {
  background: #000;
}

.social-link[href*="linkedin"]:hover {
  background: #0A66C2;
}

.social-link[href*="wa.me"]:hover {
  background: #25D366;
}

.social-link[href*="instagram"]:hover {
  background: #E1306C;
}

/* Form */
.contact-form {
  flex: 1;
  min-width: 300px;
}

.contact-form .form-group {
  margin-bottom: 20px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 14px;
  transition: border 0.3s;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: #474af0;
}

.btn-send {
  background: #474af0;
  color: #fff;
  border: none;
  padding: 12px 25px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  transition: 0.3s;
}

.btn-send:hover {
  background: #2c36d9;
}

/* Responsive */
@media (max-width: 900px) {
  .contact-content {
    flex-direction: column;
  }
}


.footer {
  background-color: #000;
  color: #fff;
  padding: 40px 20px;
  text-align: center;
  overflow-x: hidden;
}

.footer-container {
  max-width: 1200px;
  margin: auto;
}

.footer-logo {
  font-family: 'Montserrat', sans-serif;
  font-size: 28px;
  margin-bottom: 20px;
}

.footer-links {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 25px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.footer-links li a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.footer-links li a:hover {
  color: #474af0;
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 15px;
}

.footer-social a {
  color: #fff;
  font-size: 18px;
  transition: color 0.3s ease;
}

.footer-social a:hover {
  color: #474af0;
}

.footer-copy {
  font-size: 12px;
  color: #aaa;
}

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.6s ease-out;
}

.active-reveal {
  opacity: 1;
  transform: translateY(0);
}

body {
  margin: 0;
  padding: 0;
  font-family: sans-serif;
}

#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #000;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  z-index: 9999;
  overflow: hidden;
  color: #00f0ff;
  text-align: center;
}

.hidden {
  opacity: 0;
  transform: translateY(-200px);
}

.fall {
  animation: fall 0.9s forwards;
}

@keyframes fall {
  0% {
    opacity: 0;
    transform: translateY(-200px);
  }

  60% {
    opacity: 1;
    transform: translateY(20px);
  }

  100% {
    transform: translateY(0);
  }
}

.loading-content h1,
.loading-content h2,
.loading-content i {
  margin: 20px 0;
}

.sub-icons {
  display: flex;
  justify-content: center;
  gap: 25px;
  margin-bottom: 20px;
}

#main-page {
  opacity: 0;
  transition: opacity 1s ease;
}

#main-page.visible {
  opacity: 1;
}

/* Responsive for tablets and phones */
@media (max-width: 1024px) {

  .home,
  .about,
  .project,
  .services,
  .contact {
    margin: 120px 50px;
  }

  .home-container,
  .about-container {
    flex-direction: column;
    gap: 3rem;
  }

  .home img,
  .about img {
    width: 100%;
    height: auto;
  }

  .ul-list {
    flex-wrap: wrap;
    gap: 1rem;
    padding: 8px 15px;
  }
}

/* Phone layout */
@media (max-width: 768px) {
  header {
    display: none;
  }

  .home,
  .about,
  .project,
  .services,
  .contact {
    margin: 100px 20px;
  }

  .home-container,
  .about-container {
    flex-direction: column;
    text-align: center;
  }

  .contact-content {
    flex-direction: column;
    gap: 2rem;
  }

  .projects-container,
  .services-container {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .home img,
  .about img {
    max-width: 250px;
    margin-top: 20px;
  }

  .btn-home1,
  .btn-home2,
  .btn,
  .btn-send {
    width: 100%;
    text-align: center;
  }

  .follow ul {
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }

  .footer-links {
    flex-direction: column;
    gap: 15px;
  }
}

@media (max-width: 1024px) {

  header {
    display: none;
  }

  .home,
  .about,
  .project,
  .services,
  .contact {
    margin: 20px auto;
    padding: 0 15px;
    text-align: center;
    max-width: 100%;
    overflow-wrap: break-word;
  }

  .home-container,
  .about-container,
  .services-container,
  .projects-container,
  .contact-content,
  .card {
    flex-direction: column !important;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
  }

  .about img {
    width: 100%;
    max-width: 220px;
    height: auto;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
  }

  .card .c1 {
    width: 100%;
    max-width: 300px;
    text-align: center;
    margin: 0 auto;
  }

  .home img,
  .project-card img,
  .service-card img {
    width: 100%;
    max-width: 300px;
    height: auto;
    display: block;
    margin: 0 auto 15px auto;
    object-fit: cover;
  }

  .info-home h1 {
    font-size: 26px;
  }

  .info-home h3 {
    font-size: 18px;
  }

  .info-p,
  .info-p2,
  .home-p,
  .about p,
  .project p,
  .service-card p,
  .contact p {
    font-size: 14px;
  }

  .project-card h3,
  .service-card h3 {
    font-size: 16px;
  }

  .contact-content {
    justify-content: center;
    align-items: center;
    text-align: center;
  }

  .contact-info,
  .contact-form {
    width: 100%;
    max-width: 400px;
  }

  html,
  body {
    overflow-x: hidden;
  }
}

@media (max-width: 600px) {
  .edu-content {
    padding: 25px 20px;
  }

  .timeline-item {
    margin-bottom: 20px;
  }
}

@media (max-width: 768px) {
  .more-projects {
    justify-content: center;
    padding-right: 0;
  }
}

@media (max-width: 768px) {
  .skills {
    margin: 100px 20px;
  }

  .skill-card {
    padding: 18px;
  }

  .skill-card h3 {
    font-size: 16px;
  }

  .icons img {
    width: 36px;
    height: 36px;
  }
}

@media (max-width: 480px) {
  .icons {
    grid-template-columns: repeat(4, 1fr);
  }

  .icons img {
    width: 32px;
    height: 32px;
  }
}

/* 🔥 GLOBAL SECTION HEADER (same as Experience) */
.section-header {
  text-align: center;
  margin-bottom: 50px;
}

/* Small label (like EXPERIENCE) */
.section-header p {
  font-size: 13px;
  letter-spacing: 3px;
  color: #474af0;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 12px;
}

/* Main heading */
.section-header h1 {
  font-family: 'Open Sans', sans-serif;
  font-size: clamp(26px, 4vw, 42px);
  font-weight: 700;
  margin-bottom: 12px;
}

/* Gradient line (same as experience) */
.section-header .section-line {
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, #474af0, #8b8df8);
  border-radius: 4px;
  margin: 0 auto 50px auto;
  position: relative;
}

.section-header .section-line::after {
  content: '';
  position: absolute;
  right: -10px;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #474af0;
}

/* ── Contact Section Mobile Fix ── */
/* ── Contact Form Mobile Size Fix ── */
@media (max-width: 768px) {
  .contact {
    margin: 60px 16px;
  }

  .contact-content {
    padding-top: 30px;
    gap: 24px;
  }

  .contact-info,
  .contact-form {
    width: 100%;
    min-width: unset;
    max-width: 100%;
  }

  .contact-form .form-group {
    margin-bottom: 14px;
  }

  .contact-form input,
  .contact-form textarea {
    width: 100%;
    box-sizing: border-box;   /* ← KEY FIX: stops overflow */
    padding: 14px 16px;
    font-size: 16px;
    border-radius: 10px;
    background-color: var(--card-color);
    color: var(--text-color);
    border: 1.5px solid rgba(71, 74, 240, 0.2);
  }

  .contact-form input:focus,
  .contact-form textarea:focus {
    border-color: #474af0;
    outline: none;
    box-shadow: 0 0 0 3px rgba(71, 74, 240, 0.1);
  }

  .contact-form textarea {
    min-height: 140px;
    resize: vertical;
  }

  .btn-send {
    width: 100%;
    padding: 15px;
    font-size: 15px;
    border-radius: 10px;
    margin-top: 4px;
  }
}

@media (max-width: 480px) {
  .contact {
    margin: 40px 16px;
  }

  .contact-details {
    gap: 12px;
  }

  .social-link {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
}

/* ── Dark mode form inputs ── */
.dark-mode .contact-form input,
.dark-mode .contact-form textarea {
  background-color: var(--card-color);
  color: var(--text-color);
  border-color: rgba(71, 74, 240, 0.25);
}

.dark-mode .contact-form input::placeholder,
.dark-mode .contact-form textarea::placeholder {
  color: #666;
}

/* ── Education Modal Mobile Fix ── */
@media (max-width: 768px) {
  .edu-modal {
    align-items: flex-start;
    padding: 16px;
    overflow-y: auto;
  }

  .edu-content {
    width: 100%;
    max-width: 100%;
    padding: 50px 18px 24px 18px;  /* ← extra top padding for close btn */
    margin: 10px auto;
    border-radius: 14px;
    max-height: 90vh;
    overflow-y: auto;
  }

  /* ── Fix close button always visible ── */
  .close-edu {
    position: sticky;           /* ← stays visible while scrolling */
    top: 0;
    float: right;
    right: 0;
    z-index: 10;
    font-size: 28px;
    font-weight: bold;
    color: #fff;
    background: rgba(71, 74, 240, 0.15);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-bottom: 16px;
    transition: background 0.2s;
  }

  .close-edu:hover {
    background: #474af0;
    color: #fff;
  }

  .edu-content h2 {
    font-size: 20px;
    margin-bottom: 16px;
    clear: both;
  }

  /* ── Timeline fixes ── */
  .timeline {
    padding-left: 20px;
  }

  .timeline-item {
    padding-left: 14px;
    margin-bottom: 20px;
  }

  .timeline-item .circle {
    left: -17.5px;
    width: 13px;
    height: 13px;
  }

  .timeline-content {
    padding: 12px 14px;
  }

  .timeline-item h3 {
    font-size: 14px;
    line-height: 1.4;
  }

  .timeline-item p {
    font-size: 13px;
    line-height: 1.6;
  }

  .edu-meta {
    flex-direction: column;
    gap: 4px;
    font-size: 11px;
  }

  .badge {
    font-size: 11px;
    padding: 3px 8px;
  }

  .year, .year-current {
    font-size: 11px;
  }
}

@media (max-width: 480px) {
  .edu-content {
    padding: 46px 14px 20px 14px;
    border-radius: 12px;
  }

  .close-edu {
    font-size: 24px;
    width: 32px;
    height: 32px;
  }
}