/* ==================== CSS VARIABLES (Custom Properties) ==================== */
:root {
  --bg-dark: #0a0e27;
  --bg-medium: #1a1f3a;
  --bg-card: #252b48;
  --text-light: #e8eaf6;
  --text-accent: #b8bcc8;
  --primary-color: #00d9ff;
  --secondary-color: #7c3aed;
  --accent-gradient: linear-gradient(135deg, #00d9ff 0%, #7c3aed 100%);
  --button-bg: #2d3250;
  --button-hover: #3d4260;
  --border-color: #2d3250;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-hover: 0 12px 48px rgba(0, 217, 255, 0.25);
  --border-radius: 16px;
  --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Light Mode Variables */
.light-mode {
  --bg-dark: #f8f9fc;
  --bg-medium: #ffffff;
  --bg-card: #f0f2f8;
  --text-light: #1a1f3a;
  --text-accent: #4a5568;
  --border-color: #e2e8f0;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 8px 32px rgba(124, 58, 237, 0.15);
}

/* ==================== ANIMATIONS & KEYFRAMES ==================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes rotateIn {
  from {
    opacity: 0;
    transform: rotate(-180deg) scale(0.5);
  }
  to {
    opacity: 1;
    transform: rotate(0deg) scale(1);
  }
}

/* ==================== GLOBAL RESET ==================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  background-color: var(--bg-dark);
  color: var(--text-light);
  transition: background-color 0.5s ease, color 0.5s ease;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* ==================== TYPOGRAPHY WITH ANIMATIONS ==================== */
h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  margin-bottom: 20px;
  line-height: 1.1;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeInUp 1s ease-out;
}

h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 30px;
  position: relative;
  display: inline-block;
  animation: slideInLeft 0.8s ease-out;
}

h2::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 60px;
  height: 4px;
  background: var(--accent-gradient);
  border-radius: 2px;
  transition: width 0.4s ease;
}

h2:hover::after {
  width: 100%;
}

h3 {
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-light);
}

p {
  margin-bottom: 15px;
  color: var(--text-accent);
  line-height: 1.8;
}

/* ==================== NAVIGATION WITH ADVANCED FLEXBOX ==================== */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  background: rgba(26, 31, 58, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: var(--transition-smooth);
}

.site-title {
  font-size: 1.6rem;
  font-weight: 700;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  z-index: 1001;
  transition: transform 0.3s ease;
  text-decoration: none;
}

.site-title:hover {
  transform: scale(1.05);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 30px;
}

nav ul {
  display: flex;
  gap: 30px;
  list-style: none;
}

nav ul li a {
  color: var(--text-accent);
  font-weight: 500;
  position: relative;
  transition: color 0.3s ease;
  text-decoration: none;
}

nav ul li a::before {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: width 0.3s ease;
}

nav ul li a:hover {
  color: var(--primary-color);
}

nav ul li a:hover::before {
  width: 100%;
}

/* Hamburger Menu */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  z-index: 1001;
  gap: 5px;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background-color: var(--text-light);
  transition: 0.3s;
  border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(-45deg) translate(-5px, 6px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(45deg) translate(-5px, -6px);
}

/* ==================== HERO SECTION WITH ADVANCED GRID ==================== */
.hero-section {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 60px;
  align-items: center;
  min-height: calc(100vh - 80px);
  padding: 80px 40px;
}

.hero-image {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.hero-image::before {
  content: '';
  position: absolute;
  width: 120%;
  height: 120%;
  background: var(--accent-gradient);
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.2;
  animation: pulse 4s infinite;
}

.hero-image img {
  max-width: 100%;
  height: auto;
  border-radius: 50%;
  border: 4px solid var(--primary-color);
  box-shadow: var(--shadow-hover);
  position: relative;
  z-index: 1;
  transition: transform 0.5s ease;
}

.hero-image:hover img {
  transform: scale(1.05) rotate(2deg);
}

.hero-content {
  animation: fadeInUp 1.2s ease-out 0.3s both;
}

.hero-content p {
  font-size: clamp(1rem, 2vw, 1.3rem);
  color: var(--text-accent);
  margin-bottom: 30px;
  line-height: 1.8;
}

.hero-buttons {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

/* ==================== BUTTONS WITH ADVANCED EFFECTS ==================== */
.primary-btn, .secondary-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  border-radius: 12px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
  text-decoration: none;
}

.primary-btn {
  background: var(--accent-gradient);
  color: white;
  box-shadow: 0 4px 15px rgba(0, 217, 255, 0.3);
}

.primary-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.5s ease;
}

.primary-btn:hover::before {
  left: 100%;
}

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

.secondary-btn {
  background-color: var(--button-bg);
  color: var(--text-light);
  border: 2px solid var(--border-color);
}

.secondary-btn:hover {
  border-color: var(--primary-color);
  background-color: var(--button-hover);
  transform: translateY(-3px);
}

/* ==================== CARD WITH HOVER ANIMATIONS ==================== */
.card {
  background-color: var(--bg-card);
  padding: 50px;
  margin-bottom: 40px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border-color);
  transition: var(--transition-smooth);
  animation: fadeInUp 0.8s ease-out;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary-color);
}

/* ==================== ADVANCED CSS GRID - SKILLS ==================== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  margin-top: 40px;
}

.skill-card {
  background: var(--bg-medium);
  padding: 30px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  transition: var(--transition-bounce);
  position: relative;
  overflow: hidden;
  text-align: center;
}

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

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

.skill-card:hover {
  transform: translateY(-10px) scale(1.02);
  border-color: var(--primary-color);
  box-shadow: 0 10px 30px rgba(0, 217, 255, 0.2);
}

.skill-card h3 {
  color: var(--primary-color);
  margin-bottom: 15px;
  font-size: 1.3rem;
}

.skill-card i {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 15px;
  transition: transform 0.6s ease;
  display: block;
}

.skill-card:hover i {
  transform: rotateY(360deg);
}

.skill-card p {
  color: var(--text-accent);
  font-size: 0.95rem;
}

/* ==================== PHOTO GALLERY WITH CSS GRID ==================== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
  margin-top: 40px;
}

.gallery-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition-smooth);
  cursor: pointer;
  aspect-ratio: 1;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(0, 217, 255, 0.9), rgba(124, 58, 237, 0.9));
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.4s ease;
  padding: 20px;
  text-align: center;
}

.gallery-item:hover img {
  transform: scale(1.1);
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.gallery-overlay h4 {
  color: white;
  font-size: 1.5rem;
  margin-bottom: 10px;
  font-weight: 700;
}

.gallery-overlay p {
  color: white;
  font-size: 0.95rem;
}

/* ==================== PROJECTS WITH ADVANCED GRID ==================== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.project-card {
  background: var(--bg-medium);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  transition: var(--transition-smooth);
  position: relative;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--accent-gradient);
  transform: scaleX(0);
  transition: transform 0.4s ease;
}

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

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-hover);
}

.project-content {
  padding: 30px;
}

.project-card h3 {
  color: var(--primary-color);
  margin-bottom: 15px;
  font-size: 1.4rem;
}

.project-card p {
  color: var(--text-accent);
  margin-bottom: 20px;
  line-height: 1.7;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.tag {
  background: var(--bg-dark);
  color: var(--primary-color);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  border: 1px solid var(--border-color);
  transition: var(--transition-smooth);
}

.tag:hover {
  background: var(--primary-color);
  color: white;
  transform: scale(1.1);
}

/* ==================== CERTIFICATIONS GRID ==================== */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.cert-item {
  background: var(--bg-medium);
  padding: 20px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 15px;
  transition: var(--transition-smooth);
}

.cert-item i {
  font-size: 1.8rem;
  color: var(--primary-color);
  transition: transform 0.6s ease;
}

.cert-item:hover {
  transform: translateX(10px);
  border-color: var(--primary-color);
  box-shadow: 0 5px 20px rgba(0, 217, 255, 0.2);
}

.cert-item:hover i {
  transform: rotate(360deg);
}

.cert-item span {
  color: var(--text-accent);
  font-size: 0.95rem;
}

/* ==================== CONTACT FORM WITH ANIMATIONS ==================== */
.contact-form .form-group {
  margin-bottom: 25px;
  animation: fadeInUp 0.6s ease-out;
}

.contact-form label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
  color: var(--text-light);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 15px;
  background-color: var(--bg-medium);
  border: 2px solid var(--border-color);
  border-radius: 10px;
  color: var(--text-light);
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  transition: var(--transition-smooth);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(0, 217, 255, 0.15);
  transform: translateY(-2px);
}

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

/* ==================== MODE TOGGLE ==================== */
.mode-toggle {
  background: var(--accent-gradient);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 25px;
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 12px rgba(0, 217, 255, 0.3);
}

.mode-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 217, 255, 0.5);
}

/* ==================== FOOTER ==================== */
footer {
  text-align: center;
  padding: 50px 20px;
  margin-top: 50px;
  background: var(--bg-medium);
  border-top: 1px solid var(--border-color);
}

footer p {
  color: var(--text-accent);
  font-size: 0.95rem;
  margin-bottom: 10px;
}

/* ==================== RESPONSIVE DESIGN ==================== */
@media (max-width: 768px) {
  .hero-section {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 40px 20px;
    gap: 40px;
  }

  .hero-buttons {
    justify-content: center;
  }

  nav {
    padding: 15px 20px;
  }

  .hamburger {
    display: flex;
  }

  .nav-right {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    height: 100vh;
    background-color: var(--bg-medium);
    flex-direction: column;
    align-items: flex-start;
    padding: 80px 30px 30px;
    gap: 30px;
    transition: right 0.3s ease;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
  }

  .nav-right.active {
    right: 0;
  }

  nav ul {
    flex-direction: column;
    gap: 20px;
    width: 100%;
  }

  nav ul li a {
    font-size: 1.2rem;
  }

  .skills-grid,
  .projects-grid,
  .gallery-grid,
  .cert-grid {
    grid-template-columns: 1fr;
  }

  .card {
    padding: 30px 20px;
  }

  h1 {
    font-size: 2.5rem;
  }

  h2 {
    font-size: 1.8rem;
  }
}

.hero-photo {
  width: 400px;        /* change this to desired size (e.g. 150px, 250px) */
  max-width: 40%;      /* keeps it responsive on small screens */
  height: auto;
  object-fit: cover;
  border-radius: 8px;  /* optional */
}