/* ====== CSS VARIABLES ====== */
:root {
  --primary-color: #11cdd4;
  --primary-dark: #11999e;
  --secondary-color: #66bfbf;
  --accent-color: #FF6B6B;
  --accent-gold: #FFD93D;
  --text-primary: #40514e;
  --text-secondary: #6b7280;
  --bg-light: #e4f9f5;
  --bg-lighter: #f0f9ff;
  --white: #ffffff;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 15px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.15);
  --transition-speed: 0.3s;
  --border-radius: 15px;
}

/* Dark mode variables */
body.dark-mode {
  --text-primary: #e5e7eb;
  --text-secondary: #9ca3af;
  --bg-light: #1f2937;
  --bg-lighter: #111827;
  --white: #1f2937;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 15px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.5);
}

body.dark-mode {
  background-color: #0f172a;
  color: var(--text-primary);
}

body.dark-mode .top-container {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

body.dark-mode .bottom-container {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

/* ====== GENERAL STYLES ====== */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  color: var(--text-primary);
  margin: 0;
  text-align: center;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
  transition: background-color var(--transition-speed), color var(--transition-speed);
}

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--primary-color);
  color: white;
  padding: 10px 20px;
  text-decoration: none;
  z-index: 10000;
  border-radius: 0 0 8px 0;
}

.skip-link:focus {
  top: 0;
}

/* Add top margin to sections to prevent overlap with fixed navbar */
.top-container,
.profile,
.experience,
.projects,
.certificates,
.skills,
.contact-me {
  scroll-margin-top: 90px;
}

/* ====== SCROLL PROGRESS BAR ====== */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--accent-color));
  width: 0%;
  z-index: 1001;
  transition: width 0.1s ease;
  box-shadow: 0 2px 4px rgba(102, 191, 191, 0.5);
}

/* ====== PROGRESS DOTS ====== */
.progress-dots {
  position: fixed;
  right: 30px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.progress-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(102, 191, 191, 0.3);
  border: 2px solid var(--secondary-color);
  cursor: pointer;
  transition: all var(--transition-speed);
  padding: 0;
}

.progress-dot:hover,
.progress-dot.active {
  background: var(--secondary-color);
  transform: scale(1.3);
  box-shadow: 0 0 10px rgba(102, 191, 191, 0.6);
}

/* ====== BACK TO TOP BUTTON ====== */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 55px;
  height: 55px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-speed);
  z-index: 998;
  box-shadow: var(--shadow-lg);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 8px 25px rgba(17, 205, 212, 0.4);
}

.back-to-top:active {
  transform: translateY(-3px) scale(1.02);
}

/* ====== THEME TOGGLE ====== */
.theme-toggle {
  position: fixed;
  bottom: 100px;
  right: 30px;
  width: 55px;
  height: 55px;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  transition: all var(--transition-speed);
  z-index: 998;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle:hover {
  transform: translateY(-5px) scale(1.05) rotate(20deg);
  box-shadow: 0 8px 25px rgba(79, 70, 229, 0.4);
}

.theme-icon {
  font-size: 26px;
}

/* ====== CURSOR SPOTLIGHT ====== */
.cursor-spotlight {
  position: fixed;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(102, 191, 191, 0.15) 0%, transparent 70%);
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s;
  z-index: 9999;
  opacity: 0;
}

.top-container:hover ~ .cursor-spotlight,
.top-container .cursor-spotlight {
  opacity: 1;
}

/* ====== BLOB ANIMATIONS ====== */
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.3;
  animation: blob-float 20s ease-in-out infinite;
  z-index: 0;
}

.blob-1 {
  width: 400px;
  height: 400px;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  top: 10%;
  left: 10%;
  animation-delay: 0s;
}

.blob-2 {
  width: 350px;
  height: 350px;
  background: linear-gradient(135deg, var(--secondary-color), var(--accent-gold));
  bottom: 20%;
  right: 10%;
  animation-delay: 5s;
}

@keyframes blob-float {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(50px, -50px) scale(1.1);
  }
  66% {
    transform: translate(-30px, 40px) scale(0.9);
  }
}

/* ====== ANIMATIONS ====== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-25px);
  }
}

@keyframes floatSlow {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

@keyframes typing-blink {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

.fade-in-up {
  animation: fadeInUp 1s ease-out forwards;
  opacity: 0;
}

.fade-in-up.delay-1 {
  animation-delay: 0.3s;
}

.fade-in-up.delay-2 {
  animation-delay: 0.6s;
}

.animate-float {
  animation: float 7s ease-in-out infinite;
}

.animate-float-slow {
  animation: floatSlow 9s ease-in-out infinite;
}

.typing-cursor {
  animation: typing-blink 1s infinite;
  color: var(--accent-color);
  font-weight: bold;
}

/* Scroll reveal animation */
.scroll-reveal {
  opacity: 0;
  transform: translateY(60px);
  transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ====== TYPOGRAPHY ====== */
h1 {
  color: var(--secondary-color);
  font-size: 5.625rem;
  margin: 10px;
  font-family: "Sacramento", cursive;
  line-height: 1.4;
  position: relative;
  z-index: 1;
}

h2 {
  color: var(--secondary-color);
  font-family: "Playfair Display", serif;
  font-size: 2.75rem;
  font-weight: 700;
  padding-bottom: 10px;
  position: relative;
  display: inline-block;
}

h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  border-radius: 2px;
}

h3 {
  color: var(--primary-dark);
  font-family: "Inter", sans-serif;
  font-weight: 600;
}

p {
  line-height: 1.8;
  font-size: 1.125rem;
  color: var(--text-secondary);
}

hr {
  border: dotted #eaf6f6 6px;
  border-bottom: none;
  width: 4%;
  margin: 80px auto;
}

body.dark-mode hr {
  border-color: #374151;
}

/* ====== NAVIGATION BAR ====== */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: rgba(102, 191, 191, 0.95);
  backdrop-filter: blur(15px);
  padding: 18px 40px;
  z-index: 1000;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all var(--transition-speed);
}

body.dark-mode .navbar {
  background-color: rgba(30, 41, 59, 0.95);
}

.hamburger {
  display: none;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
  transition: transform var(--transition-speed);
}

.hamburger:hover {
  transform: scale(1.1);
}

.hamburger-line {
  width: 28px;
  height: 3px;
  background-color: #ffffff;
  margin: 4px 0;
  transition: all var(--transition-speed);
  border-radius: 3px;
}

.hamburger.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(9px, 9px);
}

.hamburger.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.hamburger.active .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(8px, -8px);
}

.nav-links {
  list-style: none;
  display: flex;
  justify-content: flex-end;
  width: 100%;
  margin: 0;
  padding: 0;
  gap: 10px;
}

.nav-links li {
  margin: 0;
}

.nav-links a {
  text-decoration: none;
  color: #ffffff;
  font-family: "Inter", sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all var(--transition-speed);
  margin: 0;
  position: relative;
  padding: 8px 16px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.external-icon {
  font-size: 0.8rem;
  opacity: 0.7;
  transition: all var(--transition-speed);
}

.nav-links a:hover .external-icon {
  opacity: 1;
  transform: translate(2px, -2px);
}

.nav-links a::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #30e3cb, var(--accent-gold));
  transition: width var(--transition-speed);
}

.nav-links a:hover::before,
.nav-links a.active::before {
  width: 80%;
}

.nav-links a:hover {
  color: #30e3cb;
  background-color: rgba(255, 255, 255, 0.1);
}

.nav-links a.active {
  color: #30e3cb;
  background-color: rgba(255, 255, 255, 0.15);
}

/* Standard Links */
a {
  color: var(--primary-dark);
  font-family: "Inter", sans-serif;
  margin: 10px 20px;
  text-decoration: none;
  transition: all var(--transition-speed);
}

a:hover {
  color: var(--accent-color);
}

/* ====== CONTAINERS ====== */
.top-container {
  background: linear-gradient(135deg, #e4f9f5 0%, #d4f1f4 100%);
  position: relative;
  padding-top: 140px;
  padding-bottom: 80px;
  overflow: hidden;
}

.middle-container {
  margin: 80px 0;
}

.intro,
.contact-message {
  width: 90%;
  max-width: 750px;
  margin: auto;
  font-size: 1.125rem;
  line-height: 1.9;
}

.contact-message {
  margin: 40px auto 60px;
}

.bottom-container {
  background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-dark) 100%);
  position: relative;
  padding: 50px 0px 20px;
  margin-top: 80px;
}

.copyright {
  color: #eaf6f6;
  font-size: 0.875rem;
  padding: 20px 0px;
  margin: 0;
}

/* ====== HERO IMAGES ====== */
.top-cloud {
  position: absolute;
  right: 15%;
  top: 60px;
  z-index: 1;
  max-width: 120px;
}

.bottom-cloud {
  position: absolute;
  left: 10%;
  bottom: 200px;
  z-index: 1;
  max-width: 120px;
}

.mountain-img {
  position: relative;
  z-index: 1;
  max-width: 100%;
  height: auto;
}

/* ====== EXPERIENCE SECTION ====== */
.experience {
  margin: 80px auto;
  padding: 0 20px;
}

.experience-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 35px;
  max-width: 1200px;
  margin: 60px auto;
  padding: 0 20px;
}

.experience-tile {
  position: relative;
  height: 350px;
  cursor: pointer;
  border-radius: var(--border-radius);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.experience-tile:focus {
  outline: 3px solid var(--secondary-color);
  outline-offset: 4px;
}

.experience-front,
.experience-back {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  backface-visibility: hidden;
}

.experience-front {
  background: linear-gradient(135deg, var(--bg-light) 0%, var(--bg-lighter) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 25px;
  opacity: 1;
  transform: rotateY(0deg);
}

.experience-back {
  background-color: var(--white);
  border: 2px solid var(--secondary-color);
  padding: 25px;
  overflow-y: auto;
  text-align: left;
  opacity: 0;
  transform: rotateY(180deg);
  pointer-events: none;
}

.experience-back::-webkit-scrollbar {
  width: 8px;
}

.experience-back::-webkit-scrollbar-track {
  background: var(--bg-light);
  border-radius: 10px;
}

.experience-back::-webkit-scrollbar-thumb {
  background: var(--secondary-color);
  border-radius: 10px;
}

/* Close button */
.close-card {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-color);
  color: white;
  border: none;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: all var(--transition-speed);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.close-card:hover {
  transform: rotate(90deg) scale(1.1);
  background: #ff5252;
}

/* Back header with icon */
.back-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--bg-light);
}

.back-header h3 {
  margin: 0;
  flex: 1;
  text-align: left;
}

/* Hover state for desktop */
.experience-tile:hover .experience-front {
  opacity: 0;
  transform: rotateY(-180deg);
  pointer-events: none;
}

.experience-tile:hover .experience-back {
  opacity: 1;
  transform: rotateY(0deg);
  pointer-events: auto;
}

.experience-tile:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: var(--shadow-lg);
}

/* Active state for mobile/keyboard */
.experience-tile.active .experience-front {
  opacity: 0;
  transform: rotateY(-180deg);
  pointer-events: none;
}

.experience-tile.active .experience-back {
  opacity: 1;
  transform: rotateY(0deg);
  pointer-events: auto;
}

.experience-tile.active {
  transform: translateY(-12px) scale(1.02);
  box-shadow: var(--shadow-lg);
}

.company-icon {
  width: 180px;
  height: 180px;
  border-radius: var(--border-radius);
  overflow: hidden;
  margin-bottom: 20px;
  border: 4px solid var(--secondary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--white);
  padding: 15px;
  transition: all var(--transition-speed);
}

.experience-tile:hover .company-icon {
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(102, 191, 191, 0.3);
}

.company-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform var(--transition-speed);
}

.company-icon-small {
  width: 70px;
  height: 70px;
  border-radius: 12px;
  overflow: hidden;
  border: 3px solid var(--secondary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--white);
  padding: 8px;
  flex-shrink: 0;
}

.company-icon-small img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.experience-front h3 {
  color: var(--primary-dark);
  font-family: "Inter", sans-serif;
  font-size: 1.4rem;
  margin: 0;
  text-align: center;
  transition: color var(--transition-speed);
  font-weight: 600;
}

.experience-tile:hover .experience-front h3 {
  color: var(--secondary-color);
}

.experience-back h3 {
  color: var(--primary-dark);
  font-family: "Inter", sans-serif;
  font-size: 1.2rem;
  margin: 0;
  font-weight: 600;
}

.experience-back .meta {
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 8px 0;
  color: var(--text-secondary);
}

.experience-back ul {
  margin: 20px 0 0 0;
  padding-left: 22px;
  list-style-type: none;
}

.experience-back li {
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 12px;
  color: var(--text-secondary);
  position: relative;
  padding-left: 8px;
}

.experience-back li::before {
  content: '▹';
  position: absolute;
  left: -14px;
  color: var(--accent-color);
  font-weight: bold;
}

/* ====== SKILLS SECTION ====== */
.skills {
  margin: 80px auto;
  padding: 0 20px;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 35px;
  max-width: 1300px;
  margin: 60px auto;
  padding: 0 20px;
}

.skill-tile {
  position: relative;
  height: 350px;
  cursor: pointer;
  border-radius: var(--border-radius);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.skill-tile:focus {
  outline: 3px solid var(--secondary-color);
  outline-offset: 4px;
}

.skill-front,
.skill-back {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  backface-visibility: hidden;
}

.skill-front {
  background: linear-gradient(135deg, var(--bg-light) 0%, var(--bg-lighter) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 25px;
  opacity: 1;
  transform: rotateY(0deg);
}

.skill-back {
  background-color: var(--white);
  border: 2px solid var(--secondary-color);
  padding: 25px;
  overflow-y: auto;
  text-align: left;
  opacity: 0;
  transform: rotateY(180deg);
  pointer-events: none;
}

.skill-back::-webkit-scrollbar {
  width: 8px;
}

.skill-back::-webkit-scrollbar-track {
  background: var(--bg-light);
  border-radius: 10px;
}

.skill-back::-webkit-scrollbar-thumb {
  background: var(--secondary-color);
  border-radius: 10px;
}

/* Hover state for desktop */
.skill-tile:hover .skill-front {
  opacity: 0;
  transform: rotateY(-180deg);
  pointer-events: none;
}

.skill-tile:hover .skill-back {
  opacity: 1;
  transform: rotateY(0deg);
  pointer-events: auto;
}

.skill-tile:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: var(--shadow-lg);
}

/* Active state for mobile/keyboard */
.skill-tile.active .skill-front {
  opacity: 0;
  transform: rotateY(-180deg);
  pointer-events: none;
}

.skill-tile.active .skill-back {
  opacity: 1;
  transform: rotateY(0deg);
  pointer-events: auto;
}

.skill-tile.active {
  transform: translateY(-12px) scale(1.02);
  box-shadow: var(--shadow-lg);
}

.skill-icon {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 20px;
  border: 4px solid var(--secondary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--white);
  transition: all var(--transition-speed);
  padding: 10px;
}

.skill-tile:hover .skill-icon {
  transform: scale(1.08) rotate(5deg);
  box-shadow: 0 8px 25px rgba(102, 191, 191, 0.4);
}

.skill-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.skill-icon-small {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--secondary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--white);
  padding: 8px;
  flex-shrink: 0;
}

.skill-icon-small img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.skill-front h3 {
  color: var(--primary-dark);
  font-family: "Inter", sans-serif;
  font-size: 1.2rem;
  margin: 0;
  text-align: center;
  transition: color var(--transition-speed);
  font-weight: 600;
}

.skill-tile:hover .skill-front h3 {
  color: var(--secondary-color);
}

.skill-back h3 {
  color: var(--primary-dark);
  font-family: "Inter", sans-serif;
  font-size: 1.1rem;
  margin: 0 0 20px 0;
  font-weight: 600;
}

.skill-back ul {
  margin: 20px 0 0 0;
  padding-left: 22px;
  list-style-type: none;
}

.skill-back li {
  font-size: 0.95rem;
  line-height: 1.9;
  margin-bottom: 12px;
  color: var(--text-secondary);
  position: relative;
  padding-left: 8px;
}

.skill-back li::before {
  content: '▹';
  position: absolute;
  left: -14px;
  color: var(--accent-color);
  font-weight: bold;
}

/* ====== PROJECTS SECTION ====== */
.projects {
  margin: 80px auto;
  padding: 0 20px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 35px;
  max-width: 1200px;
  margin: 60px auto;
  padding: 0 20px;
}

.project-tile {
  background: linear-gradient(135deg, var(--bg-light) 0%, var(--bg-lighter) 100%);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.project-tile:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: var(--shadow-lg);
}

.project-tile:focus {
  outline: 3px solid var(--secondary-color);
  outline-offset: 4px;
}

.project-logo {
  width: 100%;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-dark) 100%);
  font-size: 4rem;
  font-weight: bold;
  color: white;
  font-family: "Inter", sans-serif;
  transition: all var(--transition-speed);
}

.project-tile:hover .project-logo {
  transform: scale(1.1);
}

.project-content {
  padding: 25px;
  background-color: var(--white);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.project-name {
  color: var(--primary-dark);
  font-family: "Inter", sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  text-align: center;
  transition: color var(--transition-speed);
}

.project-tile:hover .project-name {
  color: var(--secondary-color);
}

.project-description {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
  text-align: center;
  flex: 1;
}

.project-stats {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 10px;
  padding-top: 15px;
  border-top: 1px solid var(--bg-light);
}

.stat {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 600;
}

/* Skeleton loading */
.skeleton-card {
  background: linear-gradient(90deg, var(--bg-light) 25%, var(--bg-lighter) 50%, var(--bg-light) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--border-radius);
  height: 320px;
}

.loading-text {
  color: var(--secondary-color);
  font-size: 1.2rem;
  font-family: "Inter", sans-serif;
  padding: 50px;
  animation: pulse 2s ease-in-out infinite;
  grid-column: 1 / -1;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.error-text {
  color: var(--accent-color);
  font-size: 1.1rem;
  font-family: "Inter", sans-serif;
  padding: 30px;
  grid-column: 1 / -1;
}

/* ====== CERTIFICATES SECTION ====== */
.certificates {
  margin: 80px auto;
  padding: 0 20px;
}

.certificate-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 35px;
  max-width: 1200px;
  margin: 60px auto 40px;
  padding: 0 20px;
}

.certificate-tile {
  height: 250px;
  background: linear-gradient(135deg, var(--bg-light) 0%, var(--bg-lighter) 100%);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.certificate-tile:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: var(--shadow-lg);
}

.certificate-tile:focus {
  outline: 3px solid var(--secondary-color);
  outline-offset: 4px;
}

.certificate-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-speed);
}

.certificate-tile:hover img {
  transform: scale(1.08);
}

.certificate-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(17, 153, 158, 0.95);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition-speed);
  padding: 20px;
}

.certificate-tile:hover .certificate-overlay {
  opacity: 1;
}

.view-icon {
  font-size: 3rem;
  margin-bottom: 15px;
}

.certificate-overlay p {
  color: white;
  font-family: "Inter", sans-serif;
  font-weight: 600;
  font-size: 1rem;
  text-align: center;
  margin: 0;
}

.resume-download {
  margin-top: 60px;
}

/* ====== CERTIFICATE MODAL ====== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-speed);
}

.modal.show {
  opacity: 1;
  visibility: visible;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(5px);
}

.modal-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  background: var(--white);
  border-radius: var(--border-radius);
  padding: 30px;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
  animation: modalSlideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalSlideIn {
  from {
    transform: scale(0.8) translateY(50px);
    opacity: 0;
  }
  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

.modal-content img {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 10px;
  margin-bottom: 20px;
}

.modal-content p {
  color: var(--text-primary);
  font-family: "Inter", sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
  text-align: center;
  margin: 0;
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-color);
  color: white;
  border: none;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  transition: all var(--transition-speed);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.modal-close:hover {
  transform: rotate(90deg) scale(1.1);
  background: #ff5252;
}

/* ====== IMAGE STYLES ====== */
.dp-img {
  width: 200px;
  border-radius: 100%;
  border: 5px solid var(--secondary-color);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-speed);
  cursor: pointer;
}

.dp-img:hover {
  transform: scale(1.08);
  box-shadow: var(--shadow-lg);
}

/* ====== BUTTONS ====== */
.btn {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  border-radius: 12px;
  font-family: "Inter", sans-serif;
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 600;
  padding: 14px 32px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition-speed);
  box-shadow: 0 4px 15px rgba(17, 205, 212, 0.3);
  position: relative;
  overflow: hidden;
  margin: 10px;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.6s ease;
}

.btn:hover::before {
  left: 100%;
}

.btn:hover {
  background: linear-gradient(135deg, #30e3cb, #2bc4ad);
  text-decoration: none;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(17, 205, 212, 0.5);
  color: white;
}

.btn:active {
  transform: translateY(-1px);
}

.btn:focus {
  outline: 3px solid #30e3cb;
  outline-offset: 3px;
}

.btn-icon {
  font-size: 1.2rem;
}

/* Ripple effect */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transform: scale(0);
  animation: ripple-animation 0.6s ease-out;
  pointer-events: none;
}

@keyframes ripple-animation {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

.contact-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 30px;
}

.pro {
  text-decoration: underline;
  color: var(--accent-color);
}

/* ====== TOAST NOTIFICATION ====== */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(200px);
  background: linear-gradient(135deg, var(--primary-dark), var(--secondary-color));
  color: white;
  padding: 16px 32px;
  border-radius: 50px;
  font-family: "Inter", sans-serif;
  font-weight: 600;
  font-size: 1rem;
  box-shadow: var(--shadow-lg);
  z-index: 10001;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  white-space: nowrap;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
}

/* ====== RESPONSIVE DESIGN ====== */
@media (max-width: 1200px) {
  h1 {
    font-size: 4.5rem;
  }
  
  h2 {
    font-size: 2.25rem;
  }
}

@media (max-width: 900px) {
  .experience-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
  }
  
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
  }
  
  .projects-grid,
  .certificate-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
  }
  
  .progress-dots {
    display: none;
  }
  
  /* Disable 3D rotation on tablets for better performance */
  .experience-tile,
  .skill-tile {
    height: auto;
    min-height: 320px;
  }
  
  .experience-tile:hover .experience-front,
  .skill-tile:hover .skill-front {
    opacity: 1;
    transform: rotateY(0deg);
    pointer-events: auto;
  }
  
  .experience-tile:hover .experience-back,
  .skill-tile:hover .skill-back {
    opacity: 0;
    transform: rotateY(180deg);
    pointer-events: none;
  }
  
  .experience-tile:hover,
  .skill-tile:hover {
    transform: none;
    box-shadow: var(--shadow-md);
  }
  
  /* Mobile active state uses slide-up instead of flip */
  .experience-tile.active,
  .skill-tile.active {
    height: auto;
    min-height: auto;
  }
  
  .experience-tile.active .experience-back,
  .skill-tile.active .skill-back {
    position: relative;
    transform: none;
    opacity: 1;
    margin-top: 0;
    pointer-events: auto;
  }
  
  .experience-tile.active .experience-front,
  .skill-tile.active .skill-front {
    display: none;
  }
}

@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }
  
  .nav-links {
    position: fixed;
    right: -400px;
    top: 0;
    height: 100vh;
    width: 300px;
    max-width: 80vw;
    background-color: rgba(102, 191, 191, 0.98);
    backdrop-filter: blur(15px);
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    padding: 100px 30px 30px;
    transition: right 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.3);
    opacity: 1;
    visibility: visible;
    overflow-y: auto;
  }
  
  body.dark-mode .nav-links {
    background-color: rgba(30, 41, 59, 0.98);
  }
  
  .nav-links.active {
    right: 0;
  }
  
  .nav-links li {
    margin: 8px 0;
    width: 100%;
  }
  
  .nav-links a {
    display: block;
    padding: 14px 20px;
    width: 100%;
    border-radius: 10px;
    transition: all var(--transition-speed);
    text-align: left;
  }
  
  .nav-links a:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateX(5px);
  }
  
  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    font-size: 22px;
  }
  
  .theme-toggle {
    bottom: 85px;
    right: 20px;
    width: 50px;
    height: 50px;
  }
  
  h1 {
    font-size: 3.5rem;
  }
  
  h2 {
    font-size: 2rem;
  }
  
  .top-cloud,
  .bottom-cloud {
    max-width: 80px;
  }
  
  .blob {
    width: 250px;
    height: 250px;
  }
}

@media (max-width: 600px) {
  .experience-grid,
  .skills-grid,
  .projects-grid,
  .certificate-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  h1 {
    font-size: 2.8rem;
  }
  
  h2 {
    font-size: 1.75rem;
  }
  
  p {
    font-size: 1rem;
  }
  
  .company-icon {
    width: 140px;
    height: 140px;
  }
  
  .skill-icon {
    width: 140px;
    height: 140px;
  }
  
  .btn {
    font-size: 1rem;
    padding: 12px 24px;
  }
  
  .top-container {
    padding-top: 120px;
    padding-bottom: 60px;
  }
  
  .middle-container {
    margin: 60px 0;
  }
  
  .intro,
  .contact-message {
    font-size: 1rem;
  }
  
  .modal-content {
    padding: 20px;
  }
  
  .modal-content img {
    max-height: 60vh;
  }
  
  .cursor-spotlight {
    display: none;
  }
  
  .blob {
    display: none;
  }
}

@media (max-width: 400px) {
  h1 {
    font-size: 2.2rem;
  }
  
  .navbar {
    padding: 15px 20px;
  }
  
  .btn {
    font-size: 0.9rem;
    padding: 10px 20px;
  }
  
  .contact-links {
    flex-direction: column;
    align-items: center;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .btn,
  .project-tile,
  .certificate-tile,
  .experience-tile,
  .skill-tile {
    border: 2px solid currentColor;
  }
}


.mountain-img {
  width: 100%;
  max-width: 600px;
  height: auto;
}


@media (hover: hover) {
  .experience-tile:hover .experience-front,
  .skill-tile:hover .skill-front {
    opacity: 0;
    transform: scale(0.95);
    pointer-events: none;
  }

  .experience-tile:hover .experience-back,
  .skill-tile:hover .skill-back {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
  }
}

/* ====== MODAL STYLES (Add at the end of styles.css) ====== */

/* Modal Overlay */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 2000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
}

/* Modal Container */
.modal-container {
  background-color: #ffffff;
  border-radius: 15px;
  width: 90%;
  max-width: 500px;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  padding: 30px 25px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  transform: scale(0.8);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal-container {
  transform: scale(1);
}

/* Close Button */
.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 30px;
  color: #11999e;
  cursor: pointer;
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.3s, transform 0.2s;
}

.modal-close:hover {
  background-color: #e4f9f5;
  transform: rotate(90deg);
}

/* Modal Content */
.modal-content {
  text-align: left;
}

.modal-header {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid #e4f9f5;
}

.modal-icon {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  overflow: hidden;
  margin-right: 15px;
  border: 3px solid #66bfbf;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #ffffff;
  flex-shrink: 0;
}

.modal-icon.round {
  border-radius: 50%;
}

.modal-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-title {
  color: #11999e;
  font-family: "Montserrat", sans-serif;
  font-size: 1.3rem;
  margin: 0;
}

.modal-body {
  color: #40514e;
}

.modal-body .meta {
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 8px 0;
  color: #40514e;
  font-family: "Montserrat", sans-serif;
}

.modal-body ul {
  margin: 15px 0 0 0;
  padding-left: 20px;
  list-style-type: disc;
}

.modal-body li {
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 10px;
  color: #40514e;
  font-family: "Montserrat", sans-serif;
}

/* Smooth scrollbar for modal */
.modal-container::-webkit-scrollbar {
  width: 8px;
}

.modal-container::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.modal-container::-webkit-scrollbar-thumb {
  background: #66bfbf;
  border-radius: 10px;
}

.modal-container::-webkit-scrollbar-thumb:hover {
  background: #11999e;
}