:root {
  --bg: linear-gradient(135deg, #181c2f 0%, #232946 100%);
  --text: #e2e8f0;
  --accent: #0077b6;
  --accent-hover: #0096c7;
  --card-bg: rgba(255, 255, 255, 0.07);
  --card-border: rgba(255, 255, 255, 0.13);
  --shadow: rgba(0, 0, 0, 0.35);
  --heading: #ffffff;
  --glass-bg: rgba(255, 255, 255, 0.10);
  --glass-border: rgba(255, 255, 255, 0.18);
  --secondary: #64748b;
  --success: #10b981;
  --warning: #f59e0b;
}

body.light-theme {
  --bg: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #ffffff 100%);
  --text: #232946;
  --accent: #0077b6;
  --accent-hover: #0096c7;
  --card-bg: rgba(255, 255, 255, 0.98);
  --card-border: rgba(0, 0, 0, 0.08);
  --shadow: rgba(0, 0, 0, 0.07);
  --heading: #181c2f;
  --glass-bg: rgba(255, 255, 255, 0.98);
  --glass-border: rgba(0, 0, 0, 0.08);
  --secondary: #64748b;
  --success: #059669;
  --warning: #d97706;
}

body.light-theme {
  --bg: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #cbd5e1 100%);
  --text: #1e293b;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --card-bg: rgba(255, 255, 255, 0.8);
  --card-border: rgba(0, 0, 0, 0.1);
  --shadow: rgba(0, 0, 0, 0.1);
  --heading: #0f172a;
  --glass-bg: rgba(255, 255, 255, 0.6);
  --glass-border: rgba(0, 0, 0, 0.1);
}

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

body {
  font-family: 'Poppins', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  scroll-behavior: smooth;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-x: hidden;
  min-height: 100vh;
}

/* Preloader */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

#preloader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader {
  text-align: center;
}

.spinner {
  width: 60px;
  height: 60px;
  border: 4px solid var(--glass-border);
  border-top: 4px solid var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Loader spinner for pagination */
.preloader {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 60px;
  margin-bottom: 1rem;
}
.preloader.hidden {
  display: none;
}
.preloader:after {
  content: '';
  display: block;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 4px solid #ccc;
  border-top: 4px solid var(--primary-color, #0078d4);
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Instagram-like Swipe Animations */
@keyframes swipeInLeft {
  from {
    opacity: 0;
    transform: translateX(-100px) rotate(-5deg);
    filter: blur(5px);
  }
  60% {
    opacity: 0.8;
    transform: translateX(10px) rotate(1deg);
    filter: blur(1px);
  }
  to {
    opacity: 1;
    transform: translateX(0) rotate(0deg);
    filter: blur(0);
  }
}

@keyframes swipeInRight {
  from {
    opacity: 0;
    transform: translateX(100px) rotate(5deg);
    filter: blur(5px);
  }
  60% {
    opacity: 0.8;
    transform: translateX(-10px) rotate(-1deg);
    filter: blur(1px);
  }
  to {
    opacity: 1;
    transform: translateX(0) rotate(0deg);
    filter: blur(0);
  }
}

@keyframes swipeInUp {
  from {
    opacity: 0;
    transform: translateY(80px) scale(0.9);
    filter: blur(3px);
  }
  70% {
    opacity: 0.9;
    transform: translateY(-5px) scale(1.02);
    filter: blur(0.5px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes slideInBounce {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  60% {
    opacity: 1;
    transform: translateY(-10px);
  }
  80% {
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(20px);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.05) translateY(-5px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes rotateIn {
  from {
    opacity: 0;
    transform: rotate(-10deg) scale(0.9) translateY(30px);
  }
  70% {
    opacity: 0.8;
    transform: rotate(2deg) scale(1.02) translateY(-5px);
  }
  to {
    opacity: 1;
    transform: rotate(0deg) scale(1) translateY(0);
  }
}

/* Enhanced Reveal System */
.reveal {
  opacity: 0;
  transform: translateY(60px) scale(0.95);
  filter: blur(2px);
  transition: all 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: opacity, transform, filter;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}

/* Different animation types for variety */
.reveal-left {
  transform: translateX(-80px) scale(0.9);
  animation: swipeInLeft 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

.reveal-right {
  transform: translateX(80px) scale(0.9);
  animation: swipeInRight 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

.reveal-up {
  transform: translateY(80px) scale(0.9);
  animation: swipeInUp 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

.reveal-bounce {
  animation: slideInBounce 1s cubic-bezier(0.68, -0.55, 0.265, 1.55) both;
}

.reveal-scale {
  animation: fadeInScale 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

.reveal-rotate {
  animation: rotateIn 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

/* Staggered animation delays with more variety */
.reveal:nth-child(1) { transition-delay: 0.1s; }
.reveal:nth-child(2) { transition-delay: 0.2s; }
.reveal:nth-child(3) { transition-delay: 0.3s; }
.reveal:nth-child(4) { transition-delay: 0.4s; }
.reveal:nth-child(5) { transition-delay: 0.5s; }
.reveal:nth-child(6) { transition-delay: 0.6s; }
.reveal:nth-child(7) { transition-delay: 0.7s; }
.reveal:nth-child(8) { transition-delay: 0.8s; }

/* Micro-animations for interactive elements */
.card {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
}

.card:hover {
  transform: translateY(-8px) scale(1.02) rotate(1deg);
  box-shadow: 0 20px 40px var(--shadow);
  /* No blur or brightness on hover */
  filter: none;
}

.btn-primary, .btn-secondary {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
}

.btn-primary:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 25px rgba(0, 212, 255, 0.4);
}

.btn-secondary:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 25px rgba(0, 180, 216, 0.3);
}

/* Floating animation for decorative elements */
@keyframes float {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  33% {
    transform: translateY(-15px) rotate(2deg);
  }
  66% {
    transform: translateY(8px) rotate(-1deg);
  }
}

.float-animation {
  animation: float 6s ease-in-out infinite;
}

/* Pulse animation for accent elements */
@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(0, 180, 216, 0.4);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 0 10px rgba(0, 180, 216, 0);
  }
}

.pulse-animation {
  animation: pulse 3s ease-in-out infinite;
}

/* Pagination Styles */
.pagination-container {
  margin-top: 3rem;
  text-align: center;
}

.pagination-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
}

.pagination-btn {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px var(--shadow);
}

.pagination-btn:hover:not(:disabled) {
  transform: translateY(-3px) scale(1.1);
  box-shadow: 0 8px 25px var(--shadow);
  background: var(--accent);
  color: var(--bg);
}

.pagination-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  transform: none;
}

.pagination-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.current-page {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
}

.total-pages {
  font-size: 0.9rem;
  color: var(--secondary);
}

.pagination-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--glass-border);
  cursor: pointer;
  transition: all 0.3s ease;
}

.dot.active {
  background: var(--accent);
  transform: scale(1.3);
}

.dot:hover {
  background: var(--accent);
  transform: scale(1.2);
}

/* Swipe Animation */
@keyframes swipeRight {
  from {
    opacity: 0;
    transform: translateX(100px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes swipeLeft {
  from {
    opacity: 0;
    transform: translateX(-100px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.swipe-right {
  animation: swipeRight 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.swipe-left {
  animation: swipeLeft 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* Mobile Pagination Adjustments */
@media (max-width: 768px) {
  .pagination-controls {
    gap: 1rem;
  }

  .pagination-btn {
    width: 45px;
    height: 45px;
    font-size: 1rem;
  }

  .current-page {
    font-size: 1.3rem;
  }

  .dot {
    width: 10px;
    height: 10px;
  }
}

/* Different animation types for variety */
.fade-in-up {
  opacity: 0;
  animation-fill-mode: both;
}

.slide-in-left {
  opacity: 0;
  animation-fill-mode: both;
}

.slide-in-right {
  opacity: 0;
  animation-fill-mode: both;
}

.scale-in {
  opacity: 0;
  animation: scaleIn 0.8s ease-out both;
}

.bounce-in {
  opacity: 0;
  animation: bounceIn 1s ease-out both;
}

/* Parallax elements */
.parallax {
  will-change: transform;
}

.loader p {
  color: var(--accent);
  font-size: 1.2rem;
  font-weight: 500;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--accent-hover);
}

nav.nav-bar {
  display: flex;
  justify-content: center;
  gap: 2rem;
  padding: 1.5rem 2rem;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  box-shadow: 0 4px 20px var(--shadow);
}

.theme-toggle {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--accent);
  font-size: 16px;
  margin-left: auto;
}

.theme-toggle:hover {
  background: var(--accent);
  color: var(--bg);
  transform: scale(1.1);
}

nav.nav-bar a {
  font-weight: 500;
  font-size: 1rem;
  position: relative;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: all 0.3s ease;
}

nav.nav-bar a:hover {
  background: var(--accent);
  color: var(--bg);
  transform: translateY(-2px);
}

nav.nav-bar a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

nav.nav-bar a:hover::after {
  width: 100%;
}

.section {
  padding: 6rem 2rem 4rem;
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
}

.section h2 {
  font-size: 2.8rem;
  margin-bottom: 3rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-align: center;
  position: relative;
}

.section h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: var(--accent);
  border-radius: 2px;
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 10rem 2rem 6rem;
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 30% 40%, rgba(0, 212, 255, 0.1) 0%, transparent 50%),
              radial-gradient(circle at 70% 60%, rgba(0, 168, 204, 0.1) 0%, transparent 50%);
  z-index: -1;
}

.hero-photo-container {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--accent);
  box-shadow: 0 0 40px rgba(0, 212, 255, 0.3);
  margin-bottom: 2rem;
  position: relative;
  animation: float 6s ease-in-out infinite, pulse 4s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

.hero-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.hero-photo-container:hover .hero-photo {
  transform: scale(1.1);
}

.hero h1 {
  font-size: 4rem;
  font-weight: 800;
  margin: 1.5rem 0;
  color: var(--heading);
  animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero h1 span {
  display: inline-block;
  position: relative;
}

.tagline {
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--accent);
  margin: 1rem 0;
  animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-content p {
  margin-top: 0.5rem;
  font-size: 1.2rem;
  animation: fadeInUp 1s ease-out 0.4s both;
}

.hero-actions {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
  animation: fadeInUp 1s ease-out 0.5s both;
}

.btn-resume {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 12px 24px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 120, 212, 0.3);
}

.btn-resume:hover {
  background: #005a9e;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 120, 212, 0.4);
}

.btn-resume i {
  font-size: 1rem;
}

.socials {
  margin-top: 2rem;
  display: flex;
  gap: 2rem;
  justify-content: center;
  align-items: center;
  animation: fadeInUp 1s ease-out 0.6s both;
}

.socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px var(--shadow);
}

.socials a:hover {
  transform: translateY(-5px) scale(1.1);
  box-shadow: 0 8px 25px var(--shadow);
  background: var(--accent);
  color: var(--bg);
}

/* Floating decorative elements */
.floating-elements {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.floating-elements > div {
  position: absolute;
  opacity: 0.1;
  font-size: 3rem;
  color: var(--accent);
  animation: float 6s ease-in-out infinite;
}

.floating-elements > div:nth-child(1) {
  top: 20%;
  left: 10%;
  animation-delay: 0s;
}

.floating-elements > div:nth-child(2) {
  top: 30%;
  right: 15%;
  animation-delay: 2s;
}

.floating-elements > div:nth-child(3) {
  bottom: 25%;
  left: 20%;
  animation-delay: 4s;
}

.floating-elements > div:nth-child(4) {
  top: 50%;
  right: 10%;
  animation-delay: 1s;
}

.floating-elements > div:nth-child(5) {
  bottom: 15%;
  left: 60%;
  animation-delay: 3s;
}

.socials i,
.socials img {
  font-size: 24px;
  height: 24px;
  width: 24px;
}

.card {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 2rem;
  border-radius: 16px;
  border: 1px solid var(--card-border);
  box-shadow: 0 8px 32px var(--shadow);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.5s;
}

.card:hover::before {
  left: 100%;
}

.card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px var(--shadow);
  border-color: var(--accent);
}

.grid {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.service-card {
  text-align: center;
  padding: 2.5rem;
}

.service-card i {
  font-size: 3rem;
  color: var(--accent);
  margin-bottom: 1rem;
  display: block;
}

.service-card h3 {
  color: var(--accent);
  margin-bottom: 1rem;
}

.timeline {
  position: relative;
  margin: 3rem auto;
  width: 100%;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 6px;
  height: 100%;
  background: linear-gradient(to bottom, var(--accent), var(--accent-hover));
  transform: translateX(-50%);
  border-radius: 3px;
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

.timeline-item {
  display: flex;
  justify-content: flex-start;
  width: 100%;
  margin-bottom: 4rem;
  position: relative;
  opacity: 0;
  transform: translateY(50px);
  animation: slideIn 0.8s ease-out forwards;
}

.timeline-item:nth-child(even) {
  flex-direction: row-reverse;
}

.timeline-item:nth-child(even) .timeline-item::after {
  left: auto;
  right: 50%;
  transform: translateX(50%);
}

.timeline-item .card {
  width: 45%;
  padding: 2.5rem;
  z-index: 2;
}

.timeline-item::after {
  content: "";
  position: absolute;
  top: 2rem;
  left: 50%;
  width: 24px;
  height: 24px;
  background: var(--accent);
  border: 4px solid var(--bg);
  border-radius: 50%;
  transform: translateX(-50%);
  z-index: 3;
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

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

@keyframes scrollLeft {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.skills-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 4rem;
  width: max-content;
  animation: scrollLeft 25s linear infinite;
  will-change: transform;
  padding: 2rem 0;
}

.skills-grid:hover {
  animation-play-state: paused;
}

.skills-grid i {
  font-size: 120px;
  color: var(--accent);
  transition: all 0.4s ease;
  filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.3));
}

.skills-grid i:hover {
  transform: scale(1.2) rotate(5deg);
  color: var(--accent-hover);
  filter: drop-shadow(0 0 20px rgba(0, 168, 204, 0.6));
}

#projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  padding: 2rem 0;
}

#projects-grid .card {
  width: 100%;
  padding: 2rem;
  transition: all 0.4s ease;
  filter: none;
}

#projects-grid .card:hover {
  transform: scale(1.05) translateY(-10px);
  filter: none;
}

#projects-grid .card a {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: var(--bg);
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
}

#projects-grid .card a:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 212, 255, 0.4);
}

#projects-grid .card .card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

#projects-grid .card .card-header h3 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--heading);
  margin: 0;
  flex: 1;
}

#projects-grid .card .repo-stats {
  display: flex;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--secondary);
}

#projects-grid .card .repo-stats span {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

#projects-grid .card .repo-stats i {
  font-size: 0.8rem;
}

#projects-grid .card p {
  color: var(--text);
  margin: 1rem 0;
  line-height: 1.6;
  flex: 1;
}

#projects-grid .card .card-footer {
  display: flex;
  gap: 0.5rem;
  margin-top: auto;
  flex-wrap: wrap;
}

#projects-grid .card .btn-primary,
#projects-grid .card .btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.3s ease;
  flex: 1;
  justify-content: center;
  min-width: 120px;
}

#projects-grid .card .btn-primary {
  background: var(--accent);
  color: var(--bg);
}

#projects-grid .card .btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 212, 255, 0.4);
}

#projects-grid .card .btn-secondary {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

#projects-grid .card .btn-secondary:hover {
  background: var(--accent);
  color: var(--bg);
  transform: translateY(-2px);
}

.achievements {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.achievement-card {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 2rem;
  border-radius: 16px;
  border: 1px solid var(--card-border);
  box-shadow: 0 8px 32px var(--shadow);
  transition: all 0.4s ease;
  text-align: center;
}

.achievement-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px var(--shadow);
  border-color: var(--accent);
}

.achievement-card h3 {
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.btn {
  display: inline-block;
  margin: 1.5rem 0.5rem 0;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: var(--bg);
  font-weight: 600;
  border: none;
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 212, 255, 0.5);
}

.reveal {
  opacity: 0;
  transform: translateY(60px);
  transition: all 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: opacity, transform;
}

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

/* Staggered animation delays */
.reveal:nth-child(1) { transition-delay: 0.1s; }
.reveal:nth-child(2) { transition-delay: 0.2s; }
.reveal:nth-child(3) { transition-delay: 0.3s; }
.reveal:nth-child(4) { transition-delay: 0.4s; }
.reveal:nth-child(5) { transition-delay: 0.5s; }
.reveal:nth-child(6) { transition-delay: 0.6s; }

footer {
  text-align: center;
  padding: 3rem 2rem;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--glass-border);
  color: var(--text);
  position: relative;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

@media (max-width: 768px) {
  nav.nav-bar {
    padding: 1rem;
    gap: 1rem;
  }

  nav.nav-bar a {
    font-size: 0.9rem;
    padding: 0.4rem 0.8rem;
  }

  .section {
    padding: 4rem 1rem 3rem;
  }

  .section h2 {
    font-size: 2.2rem;
  }

  .hero {
    padding: 8rem 1rem 4rem;
  }

  .hero h1 {
    font-size: 2.8rem;
  }

  .hero-photo-container {
    width: 150px;
    height: 150px;
  }

  .timeline-item .card {
    width: 100%;
  }

  .skills-grid,
  #projects-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    animation: none;
    overflow-x: visible;
    padding-bottom: 0;
  }

  .skills-grid i {
    font-size: 80px;
  }

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

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

  .socials {
    gap: 1.5rem;
  }

  .socials a {
    width: 45px;
    height: 45px;
  }

  .socials i,
  .socials img {
    font-size: 20px;
    height: 20px;
    width: 20px;
  }
}
