/* ===== CSS VARIABLES ===== */
:root {
  /* Colors - Retained from original */
  --primary-color: #93a8d6;
  --accent-color: #bbd3fa;
  --dark-bg: #0f172a;
  --darker-bg: #020617;
  --card-bg: #1e293b;
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --border-color: rgba(59, 130, 246, 0.1);
  
  /* Additional Colors */
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --error-color: #ef4444;
  
  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.25);
  --shadow-glow: 0 0 20px rgba(147, 168, 214, 0.3);
  --shadow-glow-strong: 0 0 30px rgba(147, 168, 214, 0.5);
  
  /* Typography */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  
  /* Spacing */
  --section-padding: 8rem 0;
  --container-width: 1200px;
  --gap-sm: 1.5rem;
  --gap-md: 2.5rem;
  --gap-lg: 3.5rem;
  
  /* Transitions */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== BASE STYLES ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 62.5%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  font-size: 1.6rem;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--dark-bg);
  overflow-x: hidden;
}

::selection {
  background: var(--primary-color);
  color: white;
}

/* ===== SCROLL PROGRESS BAR ===== */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  z-index: 9999;
  transition: width 0.1s ease-out;
}

/* ===== UTILITY CLASSES ===== */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: var(--section-padding);
  position: relative;
}

.section__header {
  text-align: center;
  margin-bottom: 6rem;
}

.section__title {
  font-size: 4rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.section__title .accent {
  color: var(--primary-color);
  position: relative;
}

.section__title .accent::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  border-radius: 2px;
}

.section__subtitle {
  color: var(--text-muted);
  font-size: 1.7rem;
  max-width: 70rem;
  margin: 0 auto;
}

.accent {
  color: var(--primary-color);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideRight {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideLeft {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

[data-animate] {
  opacity: 0;
}

[data-animate].animated {
  animation-duration: 0.8s;
  animation-fill-mode: forwards;
}

[data-animate="fade-up"].animated {
  animation-name: fadeInUp;
}

[data-animate="slide-right"].animated {
  animation-name: slideRight;
}

[data-animate="slide-left"].animated {
  animation-name: slideLeft;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1.4rem 3rem;
  font-size: 1.6rem;
  font-weight: 600;
  border-radius: 0.8rem;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  border: none;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn--primary {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: white;
  box-shadow: var(--shadow-md);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow-strong);
}

.btn--secondary {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn--secondary:hover {
  background: var(--primary-color);
  color: white;
}

.btn--outline {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.btn--outline:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.btn--small {
  padding: 1rem 2rem;
  font-size: 1.4rem;
}

.btn--animated {
  position: relative;
  z-index: 1;
}

/* ===== HEADER & NAVIGATION ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}

.header.scrolled {
  background: rgba(15, 23, 42, 0.95);
  box-shadow: var(--shadow-md);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 0;
}

.nav__logo {
  font-size: 2.4rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--text-primary);
  display: flex;
  gap: 0.5rem;
  transition: var(--transition);
}

.nav__logo:hover {
  transform: scale(1.05);
}

.nav__list {
  display: flex;
  gap: 3rem;
  list-style: none;
}

.nav__link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 1.5rem;
  position: relative;
  transition: var(--transition);
  padding: 0.5rem 0;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  transition: var(--transition);
}

.nav__link:hover,
.nav__link.active-link {
  color: var(--primary-color);
}

.nav__link:hover::after,
.nav__link.active-link::after {
  width: 100%;
}

.nav__toggle,
.nav__close {
  display: none;
  font-size: 2.4rem;
  cursor: pointer;
  color: var(--text-primary);
  transition: var(--transition);
}

.nav__toggle:hover,
.nav__close:hover {
  color: var(--primary-color);
}

/* ===== HERO SECTION ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 10rem;
  background: linear-gradient(135deg, var(--darker-bg) 0%, var(--dark-bg) 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(147, 168, 214, 0.05) 0%, transparent 70%);
  animation: float 20s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(-30px, -30px);
  }
}

.hero__container {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 6rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero__greeting {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.wave {
  font-size: 3rem;
  display: inline-block;
  animation: wave 2s ease-in-out infinite;
}

@keyframes wave {
  0%, 100% {
    transform: rotate(0deg);
  }
  10%, 30% {
    transform: rotate(14deg);
  }
  20% {
    transform: rotate(-8deg);
  }
  40% {
    transform: rotate(-4deg);
  }
  50% {
    transform: rotate(10deg);
  }
  60% {
    transform: rotate(0deg);
  }
}

.greeting-text {
  font-size: 1.8rem;
  color: var(--text-muted);
  font-weight: 400;
}

.hero__title {
  font-size: 6rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 2rem;
}

.hero__subtitle-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 2.8rem;
  font-weight: 600;
  margin-bottom: 2rem;
  min-height: 4rem;
}

.subtitle-prefix {
  color: var(--text-secondary);
}

.hero__subtitle {
  color: var(--primary-color);
}

.cursor {
  color: var(--primary-color);
  animation: blink 0.7s infinite;
}

@keyframes blink {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

.hero__description {
  font-size: 1.7rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 3rem;
}

.highlight-badge {
  display: inline-block;
  padding: 0.2rem 0.8rem;
  background: rgba(147, 168, 214, 0.15);
  color: var(--primary-color);
  border-radius: 0.4rem;
  font-weight: 600;
  border: 1px solid rgba(147, 168, 214, 0.3);
}

/* ENHANCED: Better grid alignment for stats */
.hero__stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: var(--gap-md);
  margin-bottom: 3rem;
}

.stat {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 2rem;
  background: var(--card-bg);
  border-radius: 1rem;
  border: 1px solid var(--border-color);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.stat::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(147, 168, 214, 0.1), transparent);
  opacity: 0;
  transition: var(--transition);
}

.stat:hover::before {
  opacity: 1;
}

.stat:hover {
  border-color: var(--primary-color);
  transform: translateY(-5px);
  box-shadow: var(--shadow-glow);
}

.stat__icon {
  font-size: 3rem;
  color: var(--primary-color);
  transition: var(--transition);
}

.stat:hover .stat__icon {
  transform: scale(1.2) rotate(10deg);
}

.stat__number {
  font-size: 3rem;
  font-weight: 700;
  color: var(--primary-color);
}

.stat__label {
  font-size: 1.3rem;
  color: var(--text-muted);
}

.hero__buttons {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.hero__social {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.social-link {
  position: relative;
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 50%;
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 2rem;
  transition: var(--transition);
  text-decoration: none;
}

.social-link:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  transform: translateY(-5px);
  box-shadow: var(--shadow-glow);
}

.social-link .tooltip {
  position: absolute;
  bottom: -3.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--card-bg);
  color: var(--text-primary);
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 1.2rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
  border: 1px solid var(--border-color);
}

.social-link:hover .tooltip {
  opacity: 1;
  bottom: -4rem;
}

.hero__image {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.hero__img-wrapper {
  position: relative;
  width: 40rem;
  height: 40rem;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--primary-color);
  box-shadow: var(--shadow-glow-strong);
  transition: var(--transition);
}

.hero__img-wrapper:hover {
  transform: scale(1.05) rotate(5deg);
}

.hero__img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.hero__img-wrapper:hover img {
  transform: scale(1.1);
}

.hero__img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(147, 168, 214, 0.2), transparent);
  opacity: 0;
  transition: var(--transition);
}

.hero__img-wrapper:hover .hero__img-overlay {
  opacity: 1;
}

.scroll-indicator {
  position: absolute;
  bottom: 3rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  color: var(--text-muted);
  font-size: 1.3rem;
  animation: float 2s ease-in-out infinite;
}

.scroll-mouse {
  width: 2.5rem;
  height: 4rem;
  border: 2px solid var(--primary-color);
  border-radius: 2rem;
  display: flex;
  justify-content: center;
  padding-top: 0.5rem;
}

.scroll-wheel {
  width: 0.4rem;
  height: 0.8rem;
  background: var(--primary-color);
  border-radius: 0.2rem;
  animation: scroll 2s ease-in-out infinite;
}

@keyframes scroll {
  0% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(1.5rem);
  }
}

/* ===== ABOUT SECTION ===== */
.about {
  background: var(--darker-bg);
}

/* ENHANCED: Better grid alignment with auto-fit */
.about__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(30rem, 1fr));
  gap: var(--gap-lg);
  justify-items: center;
}

.about__card {
  background: var(--card-bg);
  padding: 4rem 3rem;
  border-radius: 1.2rem;
  border: 1px solid var(--border-color);
  transition: var(--transition);
  text-align: center;
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 45rem;
}

.about__card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(147, 168, 214, 0.05), transparent);
  opacity: 0;
  transition: var(--transition);
}

.about__card:hover::before {
  opacity: 1;
}

.about__card:hover {
  border-color: var(--primary-color);
  transform: translateY(-10px);
  box-shadow: var(--shadow-glow);
}

.card__icon {
  width: 8rem;
  height: 8rem;
  margin: 0 auto 2rem;
  border-radius: 50%;
  background: rgba(147, 168, 214, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  font-size: 3.5rem;
  border: 2px solid var(--border-color);
  transition: var(--transition);
}

.about__card:hover .card__icon {
  background: var(--primary-color);
  color: white;
  transform: rotateY(360deg);
  border-color: var(--primary-color);
}

.about__card h3 {
  font-size: 2.2rem;
  margin-bottom: 1.5rem;
}

.about__card p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 2rem;
}

.card__footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: center;
}

.card__tag {
  padding: 0.4rem 1rem;
  background: rgba(147, 168, 214, 0.1);
  color: var(--primary-color);
  border-radius: 1.5rem;
  font-size: 1.2rem;
  border: 1px solid rgba(147, 168, 214, 0.2);
}

/* ===== SKILLS SECTION ===== */
.skills {
  background: var(--dark-bg);
}

.skills__container {
  max-width: 90rem;
  margin: 0 auto;
}

.skills__accordion {
  display: grid;
  gap: var(--gap-md);
}

.skills__item {
  background: var(--card-bg);
  border-radius: 1.2rem;
  border: 1px solid var(--border-color);
  overflow: hidden;
  transition: var(--transition);
}

.skills__item:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-md);
}

.skills__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2.5rem 3rem;
  cursor: pointer;
  user-select: none;
  transition: var(--transition);
}

.skills__header:hover {
  background: rgba(147, 168, 214, 0.05);
}

.skills__title-group {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.skills__icon {
  font-size: 2.4rem;
  color: var(--primary-color);
}

.skills__title {
  font-size: 2rem;
  font-weight: 600;
}

.skills__arrow {
  font-size: 2.4rem;
  color: var(--text-muted);
  transition: var(--transition);
}

.skills__item.active .skills__arrow {
  transform: rotate(180deg);
  color: var(--primary-color);
}

.skills__content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.skills__item.active .skills__content {
  max-height: 1000px;
}

.skills__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 0 3rem 2rem;
}

.skill__tag {
  padding: 0.8rem 1.6rem;
  background: rgba(147, 168, 214, 0.1);
  border: 1px solid var(--border-color);
  border-radius: 2rem;
  font-size: 1.4rem;
  color: var(--text-secondary);
  transition: var(--transition);
  cursor: pointer;
}

.skill__tag:hover {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  transform: translateY(-2px);
}

.skills__note {
  margin: 0 3rem 2.5rem;
  padding: 1.5rem;
  background: rgba(147, 168, 214, 0.05);
  border-left: 3px solid var(--primary-color);
  border-radius: 0.5rem;
  color: var(--text-muted);
  font-size: 1.4rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.skills__note i {
  color: var(--primary-color);
  font-size: 1.8rem;
  flex-shrink: 0;
}

/* ===== EXPERIENCE SECTION (TIMELINE) ===== */
.experience {
  background: var(--darker-bg);
}

.timeline {
  position: relative;
  max-width: 90rem;
  margin: 0 auto;
  padding: 2rem 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 100%;
  background: linear-gradient(180deg, transparent, var(--primary-color), transparent);
}

.timeline__item {
  position: relative;
  margin-bottom: 6rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

.timeline__item:nth-child(even) .timeline__content {
  grid-column: 1;
}

.timeline__item:nth-child(odd) .timeline__content {
  grid-column: 2;
}

.timeline__marker {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--primary-color);
  border: 4px solid var(--dark-bg);
  box-shadow: 0 0 0 4px rgba(147, 168, 214, 0.2);
  z-index: 1;
  transition: var(--transition);
}

.timeline__item:hover .timeline__marker {
  transform: translateX(-50%) scale(1.3);
  box-shadow: 0 0 0 8px rgba(147, 168, 214, 0.3);
}

.timeline__content {
  background: var(--card-bg);
  padding: 3rem;
  border-radius: 1.2rem;
  border: 1px solid var(--border-color);
  transition: var(--transition);
  position: relative;
}

.timeline__content::before {
  content: '';
  position: absolute;
  top: 2rem;
  width: 0;
  height: 0;
  border-style: solid;
}

.timeline__item:nth-child(odd) .timeline__content::before {
  left: -15px;
  border-width: 10px 15px 10px 0;
  border-color: transparent var(--card-bg) transparent transparent;
}

.timeline__item:nth-child(even) .timeline__content::before {
  right: -15px;
  border-width: 10px 0 10px 15px;
  border-color: transparent transparent transparent var(--card-bg);
}

.timeline__content:hover {
  border-color: var(--primary-color);
  transform: translateY(-5px);
  box-shadow: var(--shadow-glow);
}

.timeline__date {
  display: inline-block;
  padding: 0.6rem 1.5rem;
  background: rgba(147, 168, 214, 0.15);
  color: var(--primary-color);
  border-radius: 2rem;
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(147, 168, 214, 0.3);
}

.timeline__title {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
}

.timeline__company {
  font-size: 1.7rem;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.timeline__list {
  list-style: none;
  margin-bottom: 2rem;
}

.timeline__list li {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  padding-left: 2rem;
  position: relative;
  line-height: 1.7;
}

.timeline__list li::before {
  content: '▹';
  position: absolute;
  left: 0;
  color: var(--primary-color);
  font-weight: bold;
}

.timeline__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.timeline__tag {
  padding: 0.4rem 1rem;
  background: rgba(147, 168, 214, 0.1);
  color: var(--primary-color);
  border-radius: 1.5rem;
  font-size: 1.2rem;
  border: 1px solid rgba(147, 168, 214, 0.2);
}

/* ===== PROJECTS SECTION ===== */
.projects {
  background: var(--dark-bg);
}

.project__filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--gap-sm);
  margin-bottom: 4rem;
}

.project__filter-btn {
  padding: 1rem 2.5rem;
  background: var(--card-bg);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  border-radius: 3rem;
  font-size: 1.4rem;
  cursor: pointer;
  transition: var(--transition);
  font-weight: 500;
}

.project__filter-btn:hover,
.project__filter-btn.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  transform: translateY(-2px);
}

/* ENHANCED: Better grid with centered last row items */
.projects__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(36rem, 1fr));
  gap: var(--gap-lg);
  justify-items: center;
}

.project__card {
  background: var(--card-bg);
  padding: 3rem;
  border-radius: 1.2rem;
  border: 1px solid var(--border-color);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 50rem;
}

.project__card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(147, 168, 214, 0.05), transparent);
  opacity: 0;
  transition: var(--transition);
}

.project__card:hover::before {
  opacity: 1;
}

.project__card:hover {
  border-color: var(--primary-color);
  transform: translateY(-10px);
  box-shadow: var(--shadow-glow-strong);
}

.project__badge {
  display: inline-block;
  padding: 0.6rem 1.5rem;
  background: rgba(147, 168, 214, 0.15);
  color: var(--primary-color);
  border-radius: 2rem;
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  width: fit-content;
  border: 1px solid rgba(147, 168, 214, 0.3);
}

.project__icon {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  filter: grayscale(20%);
  transition: var(--transition);
}

.project__card:hover .project__icon {
  filter: grayscale(0%);
  transform: scale(1.1) rotate(5deg);
}

.project__title {
  font-size: 2.4rem;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.project__tech {
  font-size: 1.4rem;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.project__description {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.8;
  flex-grow: 1;
}

.project__highlights {
  list-style: none;
  margin-bottom: 2rem;
}

.project__highlights li {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  padding-left: 2rem;
  position: relative;
  line-height: 1.7;
}

.project__highlights li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--primary-color);
  font-weight: bold;
}

.project__tech-notes {
  background: rgba(147, 168, 214, 0.05);
  padding: 1.5rem;
  border-radius: 0.8rem;
  border-left: 3px solid var(--primary-color);
  margin-bottom: 2rem;
  font-size: 1.4rem;
  color: var(--text-secondary);
}

.project__metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}

.project__metrics span {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  background: rgba(147, 168, 214, 0.1);
  border-radius: 2rem;
  font-size: 1.3rem;
  border: 1px solid var(--border-color);
}

.project__role {
  margin-top: auto;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 1.4rem;
}

/* ===== CERTIFICATIONS SECTION ===== */
.certifications {
  background: var(--darker-bg);
}

.cert__controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4rem;
  gap: 2rem;
  flex-wrap: wrap;
}

.cert__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  flex: 1;
}

.cert__filter-btn {
  padding: 1rem 2rem;
  background: var(--card-bg);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  border-radius: 3rem;
  font-size: 1.4rem;
  cursor: pointer;
  transition: var(--transition);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.cert__count {
  padding: 0.2rem 0.8rem;
  background: rgba(147, 168, 214, 0.15);
  color: var(--primary-color);
  border-radius: 1rem;
  font-size: 1.2rem;
  font-weight: 600;
}

.cert__filter-btn:hover,
.cert__filter-btn.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  transform: translateY(-2px);
}

.cert__filter-btn.active .cert__count {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

.cert__view-toggle {
  display: flex;
  gap: 0.5rem;
  background: var(--card-bg);
  padding: 0.5rem;
  border-radius: 0.8rem;
  border: 1px solid var(--border-color);
}

.view__btn {
  padding: 0.8rem 1.5rem;
  background: transparent;
  color: var(--text-secondary);
  border: none;
  border-radius: 0.6rem;
  font-size: 2rem;
  cursor: pointer;
  transition: var(--transition);
}

.view__btn:hover,
.view__btn.active {
  background: var(--primary-color);
  color: white;
}

/* ENHANCED: Better grid with centered last row items */
.cert__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(28rem, 1fr));
  gap: var(--gap-md);
  justify-items: center;
  transition: var(--transition);
}

.cert__grid.list-view {
  grid-template-columns: 1fr;
}

.cert__category {
  grid-column: 1 / -1;
  margin-top: 3rem;
  margin-bottom: 2rem;
  width: 100%;
  justify-self: stretch;
}

.cert__category:first-child {
  margin-top: 0;
}

.cert__category-title {
  font-size: 2.4rem;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.cert__category-count {
  font-size: 1.4rem;
  color: var(--text-muted);
}

.cert__card {
  background: var(--card-bg);
  border-radius: 1.2rem;
  overflow: hidden;
  border: 1px solid var(--border-color);
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  width: 100%;
  max-width: 40rem;
}

.cert__grid.list-view .cert__card {
  display: flex;
  flex-direction: row;
  max-width: 100%;
}

.cert__card:hover {
  border-color: var(--primary-color);
  transform: translateY(-5px);
  box-shadow: var(--shadow-glow);
}

.cert__image {
  width: 100%;
  height: 20rem;
  object-fit: cover;
  background: var(--darker-bg);
  transition: var(--transition);
}

.cert__grid.list-view .cert__image {
  width: 25rem;
  height: auto;
  flex-shrink: 0;
}

.cert__card:hover .cert__image {
  opacity: 0.7;
  transform: scale(1.05);
}

.cert__card::after {
  content: '🔍';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 4rem;
  opacity: 0;
  transition: var(--transition);
  pointer-events: none;
}

.cert__card:hover::after {
  opacity: 1;
}

.cert__info {
  padding: 2rem;
}

.cert__title {
  font-size: 1.6rem;
  margin-bottom: 0.8rem;
  line-height: 1.4;
}

.cert__issuer {
  font-size: 1.4rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.cert__year {
  font-size: 1.3rem;
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 1rem;
}

.cert__badge {
  display: inline-block;
  padding: 0.4rem 1rem;
  background: rgba(147, 168, 214, 0.1);
  color: var(--primary-color);
  border-radius: 1rem;
  font-size: 1.2rem;
  border: 1px solid var(--border-color);
}

/* Certificate Modal */
.cert__modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(10px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  animation: fadeIn 0.3s ease;
}

.cert__modal.active {
  display: flex;
}

.cert__modal-content {
  max-width: 120rem;
  width: 100%;
  position: relative;
  animation: slideUp 0.4s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cert__modal-content img {
  width: 100%;
  border-radius: 1rem;
  border: 2px solid var(--primary-color);
  box-shadow: var(--shadow-lg);
}

.modal__info {
  margin-top: 2rem;
  padding: 2rem;
  background: var(--card-bg);
  border-radius: 1rem;
  border: 1px solid var(--border-color);
}

.modal__info h3 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}

.modal__info p {
  color: var(--text-secondary);
  font-size: 1.5rem;
}

.cert__modal-close {
  position: absolute;
  top: -5rem;
  right: 0;
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background: rgba(147, 168, 214, 0.2);
  color: white;
  font-size: 2.5rem;
  cursor: pointer;
  border: 2px solid var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.cert__modal-close:hover {
  background: var(--primary-color);
  transform: rotate(90deg);
}

/* Project Modal */
.project__modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(10px);
  z-index: 2000;
  overflow-y: auto;
  padding: 2rem;
  animation: fadeIn 0.3s ease;
}

.project__modal.active {
  display: block;
}

.project__modal-content {
  max-width: 90rem;
  width: 100%;
  margin: 4rem auto;
  background: var(--card-bg);
  border-radius: 1.2rem;
  padding: 4rem;
  position: relative;
  border: 2px solid var(--primary-color);
  animation: slideUp 0.4s ease;
}

.project__modal-close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background: rgba(147, 168, 214, 0.2);
  color: white;
  font-size: 2.5rem;
  cursor: pointer;
  border: 2px solid var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.project__modal-close:hover {
  background: var(--primary-color);
  transform: rotate(90deg);
}

/* ===== CONTACT SECTION ===== */
.contact {
  background: var(--dark-bg);
}

/* ENHANCED: Better grid with centered last row items */
.contact__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(25rem, 1fr));
  gap: var(--gap-md);
  justify-items: center;
}

.contact__card {
  background: var(--card-bg);
  padding: 3rem;
  border-radius: 1.2rem;
  border: 1px solid var(--border-color);
  transition: var(--transition);
  text-align: center;
  position: relative;
  width: 100%;
  max-width: 35rem;
}

.contact__card:hover {
  border-color: var(--primary-color);
  transform: translateY(-10px);
  box-shadow: var(--shadow-glow);
}

.contact__card--resume {
  background: linear-gradient(135deg, rgba(147, 168, 214, 0.1), rgba(187, 211, 250, 0.05));
  border: 2px solid var(--primary-color);
}

.contact__icon {
  width: 7rem;
  height: 7rem;
  margin: 0 auto 2rem;
  border-radius: 50%;
  background: rgba(147, 168, 214, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  font-size: 3rem;
  border: 2px solid var(--border-color);
  transition: var(--transition);
}

.contact__card:hover .contact__icon {
  background: var(--primary-color);
  color: white;
  transform: scale(1.1) rotate(10deg);
  border-color: var(--primary-color);
}

.contact__card h3 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.contact__card a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
  display: inline-block;
  word-break: break-word;
}

.contact__card a:hover {
  color: var(--primary-color);
  transform: translateX(5px);
}

.contact__card p {
  color: var(--text-secondary);
}

.copy-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: rgba(147, 168, 214, 0.1);
  color: var(--primary-color);
  border: 1px solid var(--border-color);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  transition: var(--transition);
  opacity: 0;
}

.contact__card:hover .copy-btn {
  opacity: 1;
}

.copy-btn:hover {
  background: var(--primary-color);
  color: white;
  transform: scale(1.1);
}

.resume-link {
  display: inline-flex !important;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem 2rem;
  background: var(--primary-color);
  color: white !important;
  border-radius: 3rem;
  font-weight: 600;
  margin-top: 1rem;
}

.resume-link:hover {
  background: var(--accent-color);
  transform: translateY(-2px) !important;
  box-shadow: var(--shadow-glow);
}

.resume-note {
  display: block;
  margin-top: 1rem;
  font-size: 1.2rem;
  color: var(--primary-color);
  font-style: italic;
}

/* ===== FOOTER ===== */
.footer {
  background: var(--darker-bg);
  padding: 5rem 0 2rem;
  border-top: 1px solid var(--border-color);
}

.footer__content {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 4rem;
  margin-bottom: 4rem;
}

.footer__logo {
  font-size: 2.4rem;
  font-weight: 700;
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.footer__description {
  color: var(--text-muted);
  font-size: 1.4rem;
  line-height: 1.8;
}

.footer__column h4 {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  color: var(--primary-color);
}

.footer__column ul {
  list-style: none;
}

.footer__column li {
  margin-bottom: 1rem;
}

.footer__column a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
  display: inline-block;
}

.footer__column a:hover {
  color: var(--primary-color);
  transform: translateX(5px);
}

.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.footer__bottom p {
  color: var(--text-muted);
  font-size: 1.4rem;
}

.footer__social {
  display: flex;
  gap: 1.5rem;
}

.footer__social a {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 2rem;
  transition: var(--transition);
}

.footer__social a:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  transform: translateY(-5px);
}

/* ===== SCROLL TO TOP BUTTON ===== */
.scroll-top {
  position: fixed;
  bottom: 3rem;
  right: 3rem;
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  background: var(--primary-color);
  color: white;
  border: none;
  font-size: 2.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
  z-index: 999;
  box-shadow: var(--shadow-glow);
}

.scroll-top.active {
  opacity: 1;
  pointer-events: auto;
}

.scroll-top:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-glow-strong);
}

/* ===== TOAST NOTIFICATION ===== */
.toast {
  position: fixed;
  bottom: 3rem;
  left: 50%;
  transform: translateX(-50%) translateY(200%);
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem 3rem;
  background: var(--card-bg);
  color: var(--text-primary);
  border-radius: 5rem;
  border: 1px solid var(--primary-color);
  box-shadow: var(--shadow-glow);
  z-index: 9999;
  transition: transform 0.3s ease;
}

.toast.active {
  transform: translateX(-50%) translateY(0);
}

.toast i {
  font-size: 2.4rem;
  color: var(--success-color);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
  html {
    font-size: 58%;
  }

  .hero__container {
    grid-template-columns: 1fr;
  }

  .hero__image {
    order: -1;
  }

  .hero__stats {
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  }

  .timeline::before {
    left: 2rem;
  }

  .timeline__item {
    grid-template-columns: 1fr;
  }

  .timeline__item:nth-child(even) .timeline__content,
  .timeline__item:nth-child(odd) .timeline__content {
    grid-column: 1;
    margin-left: 6rem;
  }

  .timeline__marker {
    left: 2rem;
  }

  .timeline__content::before {
    display: none;
  }

  .footer__content {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  html {
    font-size: 55%;
  }

  .section {
    padding: 6rem 0;
  }

  .nav__menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 28rem;
    height: 100vh;
    background: rgba(30, 41, 59, 0.98);
    backdrop-filter: blur(10px);
    padding: 8rem 3rem;
    transition: var(--transition);
    border-left: 1px solid var(--border-color);
    z-index: 999;
  }

  .nav__menu.active {
    right: 0;
  }

  .nav__list {
    flex-direction: column;
    gap: 2rem;
  }

  .nav__toggle,
  .nav__close {
    display: block;
  }

  .nav__close {
    position: absolute;
    top: 2rem;
    right: 2rem;
  }

  .hero__title {
    font-size: 4.5rem;
  }

  .hero__subtitle-wrapper {
    font-size: 2.2rem;
  }

  .hero__stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero__img-wrapper {
    width: 30rem;
    height: 30rem;
  }

  .section__title {
    font-size: 3.5rem;
  }

  .cert__controls {
    flex-direction: column;
  }

  .cert__filters {
    width: 100%;
    justify-content: center;
  }

  .cert__filter-btn {
    flex: 1;
    justify-content: center;
    min-width: 45%;
  }

  .projects__grid {
    grid-template-columns: 1fr;
  }

  .footer__content {
    grid-template-columns: 1fr;
  }

  .footer__bottom {
    flex-direction: column;
    gap: 2rem;
    text-align: center;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 52%;
  }

  .hero__title {
    font-size: 3.8rem;
  }

  .hero__subtitle-wrapper {
    font-size: 2rem;
  }

  .hero__stats {
    grid-template-columns: 1fr;
  }

  .hero__buttons {
    flex-direction: column;
    width: 100%;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .hero__img-wrapper {
    width: 25rem;
    height: 25rem;
  }

  .cert__grid {
    grid-template-columns: 1fr;
  }

  .contact__grid {
    grid-template-columns: 1fr;
  }

  .project__modal-content {
    padding: 2rem;
  }

  .scroll-top {
    bottom: 2rem;
    right: 2rem;
    width: 4.5rem;
    height: 4.5rem;
  }
}
