/* ========================= */
/* ===== PAGE ANIMATIONS ===== */
/* ========================= */

body {
  animation: pageFade 0.8s ease-in-out;
}

@keyframes pageFade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.navbar {
  animation: slideDown 0.8s ease-in-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.skill-card {
  opacity: 0;
  transform: translateY(30px);
  animation: cardUp 0.8s ease forwards;
}

.skill-card:nth-child(1) {
  animation-delay: 0.1s;
}
.skill-card:nth-child(2) {
  animation-delay: 0.2s;
}
.skill-card:nth-child(3) {
  animation-delay: 0.3s;
}
.skill-card:nth-child(4) {
  animation-delay: 0.4s;
}

@keyframes cardUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Soft skill cards staggered animation */
.soft-skill-card {
  opacity: 0;
  transform: translateY(30px);
  animation: cardUp 0.7s ease forwards;
}

.soft-skill-card:nth-child(1) {
  animation-delay: 0.1s;
}
.soft-skill-card:nth-child(2) {
  animation-delay: 0.2s;
}
.soft-skill-card:nth-child(3) {
  animation-delay: 0.3s;
}
.soft-skill-card:nth-child(4) {
  animation-delay: 0.4s;
}
.soft-skill-card:nth-child(5) {
  animation-delay: 0.5s;
}
.soft-skill-card:nth-child(6) {
  animation-delay: 0.6s;
}

footer {
  animation: fadeInFooter 1s ease-in-out;
}

@keyframes fadeInFooter {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.fa-x-twitter:before {
  content: "\e61b";
}

/* ===== RESET ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Poppins", sans-serif;
}

/* ===== BODY ===== */
html {
  overflow-x: hidden;
}

body {
  background: #0f172a;
  color: #e2e8f0;
  line-height: 1.6;
  overflow-x: hidden;
  padding-top: 70px;
}

/* LIGHT MODE */
body.light-mode {
  background: #f8fafc;
  color: #0f172a;
}

/* ===== SCROLL LOCK ===== */
body.no-scroll {
  overflow: hidden;
}

/* ========================= */
/* ===== NAVBAR ===== */
/* ========================= */

header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: linear-gradient(135deg, #020617, #0f172a);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transform: translateY(0);
  transition: transform 0.35s ease;
}

header.hide-nav {
  transform: translateY(-100%);
}

body.light-mode header {
  background: rgba(142, 153, 163, 0.658);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 8%;
  position: relative;
  z-index: 1001;
  transition: padding 0.3s ease;
}

.navbar.shrink {
  padding: 8px 8%;
}

/* LOGO */
.logo {
  color: #8b5cf6;
  font-weight: 600;
  font-size: 18px;
}

/* NAV LINKS */
.nav-links {
  display: flex;
  list-style: none;
  gap: 25px;
  align-items: center;
}

.nav-links li {
  display: flex;
  align-items: center;
}

/* REMOVE UNDERLINE */
.nav-links a,
.navbar a {
  text-decoration: none;
}

/* LINKS STYLE */
.nav-links a {
  color: #e2e8f0;
  font-weight: 500;
  transition: 0.3s ease;
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
}

body.light-mode .nav-links a {
  color: #0f172a;
}

.nav-links a:hover {
  color: #8b5cf6;
}

body.light-mode .nav-links a:hover {
  color: #8b5cf6;
}

body.light-mode .nav-links a.active {
  color: #8b5cf6;
}

/* UNDERLINE */
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 0%;
  height: 2px;
  background: #8b5cf6;
  transition: 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-links a.active::after {
  width: 100%;
}

/* THEME BUTTON */
.theme-item {
  display: flex;
  align-items: center;
}

.theme-item button {
  background: transparent;
  border: none;
  outline: none;
  color: #8b5cf6;
  font-size: 18px;
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: 0.3s ease;
  line-height: 1;
}

.theme-item button:hover {
  background: rgba(139, 92, 246, 0.15);
  transform: scale(1.1);
}

body.light-mode .theme-item button {
  color: #0f172a;
}

body.light-mode .theme-item button:hover {
  background: rgba(15, 23, 42, 0.08);
}

/* ========================= */
/* ===== MOBILE MENU ===== */
/* ========================= */

.menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.bar {
  height: 3px;
  width: 25px;
  background: currentColor;
  margin: 4px 0;
  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
}

.menu-toggle.active .bar:nth-child(1) {
  transform: translateY(11px) rotate(45deg);
}

.menu-toggle.active .bar:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active .bar:nth-child(3) {
  transform: translateY(-11px) rotate(-45deg);
}

/* ========================= */
/* ===== SKILLS SECTION ===== */
/* ========================= */

.skills {
  padding: 90px 8%;
  text-align: center;
}

.skills h1 {
  font-size: 40px;
  margin-bottom: 10px;
  color: inherit;
}

body.light-mode .skills h1 {
  color: #0f172a;
}

.skills-intro {
  color: #94a3b8;
  margin-bottom: 50px;
}

body.light-mode .skills-intro {
  color: #475569;
}

.skills-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 30px;
}

.skill-card {
  background: linear-gradient(145deg, #1e293b, #0f172a);
  padding: 28px;
  border-radius: 16px;
  text-align: left;
  border: 1px solid rgba(139, 92, 246, 0.2);
  transition: all 0.3s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  position: relative;
  overflow: hidden;
}

.skill-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 4px;
  width: 100%;
  background: linear-gradient(90deg, #8b5cf6, #38bdf8);
}

.skill-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(139, 92, 246, 0.25);
  border-color: #8b5cf6;
}

.skill-card h2 {
  margin-bottom: 15px;
  color: #8b5cf6;
  font-size: 20px;
}

.skill-card ul {
  list-style: none;
}

.skill-card li {
  margin-bottom: 10px;
  position: relative;
  padding-left: 18px;
  color: #e2e8f0;
  opacity: 0.9;
}

.skill-card li::before {
  content: "▹";
  position: absolute;
  left: 0;
  color: #8b5cf6;
}

body.light-mode .skill-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

body.light-mode .skill-card li {
  color: #0f172a;
}

/* ================================= */
/* ===== SOFT SKILLS SECTION ===== */
/* ================================= */

.soft-skills {
  padding: 20px 8% 80px;
  text-align: center;
}

.soft-skills h2 {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: #e2e8f0;
}

body.light-mode .soft-skills h2 {
  color: #0f172a;
}

.soft-skills-intro {
  color: #94a3b8;
  margin-bottom: 40px;
  font-size: 1rem;
}

body.light-mode .soft-skills-intro {
  color: #475569;
}

.soft-skills-grid {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 24px;
  max-width: 100%;
  margin: 0 auto;
  overflow-x: auto;
  padding-bottom: 8px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.soft-skills-grid::-webkit-scrollbar {
  display: none;
}

.soft-skill-card {
  background: linear-gradient(145deg, #1e293b, #0f172a);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 16px;
  padding: 28px 20px;
  width: 145px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
  cursor: default;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

/* Top accent line — matches skill-card style */
.soft-skill-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 4px;
  width: 100%;
  background: linear-gradient(90deg, #8b5cf6, #38bdf8);
}

.soft-skill-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 40px rgba(139, 92, 246, 0.25);
  border-color: #8b5cf6;
}

.soft-skill-card .icon-circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: #fff;
  flex-shrink: 0;
}

.soft-skill-card span {
  font-size: 0.88rem;
  font-weight: 500;
  color: #e2e8f0;
  line-height: 1.4;
}

/* Light mode */
body.light-mode .soft-skill-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

body.light-mode .soft-skill-card span {
  color: #0f172a;
}

/* ===== FOOTER ===== */
footer {
  background: linear-gradient(135deg, #020617, #0f172a);
  color: #cbd5f5;
  padding: 60px 20px 25px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
}

footer::before {
  content: "";
  position: absolute;
  top: -80px;
  right: -80px;
  width: 250px;
  height: 250px;
  background: radial-gradient(
    circle,
    rgba(56, 189, 248, 0.15),
    transparent 70%
  );
  filter: blur(60px);
  z-index: 0;
}

.footer-container {
  max-width: 1100px;
  margin: auto;
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.footer-container h3 {
  color: #ffffff;
  margin-bottom: 15px;
  font-size: 18px;
  text-align: center;
}

.footer-container h3.con {
  text-align: left !important;
}

.footer-contact p {
  font-size: 14px;
  margin-bottom: 10px;
  opacity: 0.85;
  transition:
    color 0.3s ease,
    transform 0.3s ease;
}

.footer-contact p:hover {
  color: #8b5cf6;
  transform: translateX(5px);
  opacity: 1;
}

.footer-contact i {
  margin-right: 10px;
  color: #8b5cf6;
}

.footer-mail {
  color: inherit;
  text-decoration: none;
}

.footer-mail:hover {
  color: #8b5cf6;
  text-decoration: underline;
}

.footer-social a {
  display: inline-block;
  margin-right: 14px;
  font-size: 26px;
 color: #8b5cf6;
  transition: 0.3s;
}

.footer-social a:hover {
  color: #8b5cf6;
  transform: translateY(-4px) scale(1.1);
}

.footer-bottom {
  text-align: center;
  margin-top: 40px;
  padding-top: 15px;
  font-size: 13px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  opacity: 0.7;
}

/* ========================= */
/* ===== RESPONSIVE ===== */
/* ========================= */

@media (max-width: 768px) {
  header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
  }

  .menu-toggle {
    display: flex;
    position: relative;
    z-index: 1005;
  }

  .theme-item {
    position: absolute;
    top: 25px;
    left: 20px;
    z-index: 1003;
  }

  .theme-item button {
    font-size: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
  }

  .nav-links a {
    font-size: 22px;
    font-weight: 500;
  }

  body.light-mode .nav-links a {
    color: #0f172a;
  }

  .nav-links {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(15, 23, 42, 0.98);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 30px;
    display: none;
    z-index: 1004;
  }

  body.light-mode .nav-links {
    background: rgba(255, 255, 255, 0.98);
  }

  .nav-links.active {
    display: flex;
  }

  .footer-container {
    flex-direction: column;
    text-align: center;
  }

  .footer-container h3.con {
    text-align: center !important;
  }

  .footer-contact p:hover {
    transform: none;
  }

  body.no-scroll {
    overflow: hidden;
    position: fixed;
    width: 100%;
  }

  /* Soft skills responsive — wrap into 2-column grid */
  .soft-skills-grid {
    flex-wrap: wrap;
    justify-content: center;
    overflow-x: unset;
    gap: 16px;
    padding-bottom: 0;
  }

  .soft-skill-card {
    width: calc(50% - 10px);
    min-width: unset;
    padding: 22px 14px;
    box-sizing: border-box;
  }

  .soft-skills h2 {
    font-size: 1.6rem;
  }
}

@media (max-width: 380px) {
  .soft-skill-card {
    width: calc(50% - 8px);
    padding: 18px 10px;
  }

  .soft-skill-card .icon-circle {
    width: 48px;
    height: 48px;
    font-size: 1.2rem;
  }
}

/* ================================= */
/* ===== TECH SKILLS REDESIGN ===== */
/* ================================= */

.skill-group {
  margin-bottom: 50px;
}

.skill-group-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-size: 1.1rem;
  font-weight: 600;
  color: #8b5cf6;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 28px;
}

.title-line {
  flex: 1;
  max-width: 80px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #8b5cf6);
}

.skill-group-title .title-line:last-child {
  background: linear-gradient(90deg, #8b5cf6, transparent);
}

body.light-mode .skill-group-title {
  color: #6d28d9;
}

.tech-skills-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
}

.tech-skill-card {
  background: linear-gradient(145deg, #1e293b, #0f172a);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 16px;
  padding: 28px 20px;
  width: 145px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
  cursor: default;
  opacity: 0;
  transform: translateY(30px);
  animation: cardUp 0.7s ease forwards;
}

.tech-skill-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 4px;
  width: 100%;
  background: linear-gradient(90deg, #8b5cf6, #38bdf8);
}

.tech-skill-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 40px rgba(139, 92, 246, 0.25);
  border-color: #8b5cf6;
}

.tech-skill-card .icon-circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: #fff;
  flex-shrink: 0;
}

.tech-skill-card span {
  font-size: 0.88rem;
  font-weight: 500;
  color: #e2e8f0;
  line-height: 1.4;
  text-align: center;
}

/* Staggered animation for tech cards */
.tech-skill-card:nth-child(1) {
  animation-delay: 0.1s;
}
.tech-skill-card:nth-child(2) {
  animation-delay: 0.2s;
}
.tech-skill-card:nth-child(3) {
  animation-delay: 0.3s;
}
.tech-skill-card:nth-child(4) {
  animation-delay: 0.4s;
}

/* Light mode */
body.light-mode .tech-skill-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

body.light-mode .tech-skill-card span {
  color: #0f172a;
}

/* Responsive */
@media (max-width: 768px) {
  .tech-skill-card {
    width: 125px;
    padding: 22px 14px;
  }
  .skill-group-title {
    font-size: 0.9rem;
  }
  .title-line {
    max-width: 40px;
  }
}

@media (max-width: 380px) {
  .tech-skill-card {
    width: 110px;
    padding: 18px 10px;
  }
  .tech-skill-card .icon-circle {
    width: 48px;
    height: 48px;
    font-size: 1.2rem;
  }
}
