﻿/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(120deg, #f1f5ff, #f9f9f9);
  color: #222;
  line-height: 1.6;
}

/* Header */
header {
  background: linear-gradient(to right, #4e54c8, #8f94fb);
  color: white;
  padding: 25px 15px;
  text-align: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  border-bottom: 2px solid rgba(255,255,255,0.1);
}

header h1 {
  font-size: 2.2rem;
  margin-bottom: 8px;
  letter-spacing: 1px;
}

nav {
  margin-top: 12px;
}

nav a {
  color: #ffffff;
  margin: 0 14px;
  text-decoration: none;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 8px;
  transition: background 0.3s ease, transform 0.2s;
}

nav a:hover {
  background-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

/* Hero Section */
.hero {
  background: linear-gradient(to right, #fdfbfb, #ebedee);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.05);
}

.hero p {
  font-size: 1.15rem;
  margin-bottom: 16px;
}

/* Section Titles */
section {
  max-width: 1100px;
  margin: auto;
  padding: 50px 20px;
}

h2 {
  color: #4e54c8;
  margin-bottom: 24px;
  font-size: 2rem;
  position: relative;
}

h2::after {
  content: "";
  width: 60px;
  height: 4px;
  background: #8f94fb;
  position: absolute;
  left: 0;
  bottom: -10px;
  border-radius: 2px;
}

/* Project Grid */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 30px;
  margin-top: 30px;
}

.project {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
  border-radius: 15px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.project:hover {
  transform: translateY(-6px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.project img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.project p {
  padding: 15px;
  text-align: center;
  font-weight: bold;
  background-color: rgba(255,255,255,0.7);
  color: #333;
  font-size: 1.05rem;
}

/* Floating WhatsApp Icon */
.floating-whatsapp {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  background-color: #25D366;
  border-radius: 50%;
  padding: 12px;
  box-shadow: 0 6px 12px rgba(0,0,0,0.3);
  transition: transform 0.3s ease;
  animation: pulse 2s infinite;
}

.floating-whatsapp img {
  width: 42px;
  height: 42px;
  display: block;
}

.floating-whatsapp:hover {
  transform: scale(1.2);
}

/* Dark Mode Toggle */
.dark-mode-toggle {
  margin-top: 15px;
}

.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
  vertical-align: middle;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  background-color: #ccc;
  border-radius: 26px;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  transition: .4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #25D366;
}

input:checked + .slider:before {
  transform: translateX(24px);
}

.toggle-text {
  margin-left: 10px;
  font-size: 0.95rem;
  font-weight: 500;
  color: #fff;
}

/* Dark Mode Theme */
body.dark {
  background-color: #1a1a1a;
  color: #ddd;
}

body.dark header {
  background: linear-gradient(to right, #2a2a2a, #3a3a3a);
}

body.dark nav a {
  color: #ddd;
}

body.dark .project {
  background-color: rgba(30, 30, 30, 0.8);
}

body.dark .project p {
  background-color: #222;
  color: #f0f0f0;
}

body.dark .slider {
  background-color: #777;
}

body.dark input:checked + .slider {
  background-color: #00cc88;
}

/* Responsive Font Sizes */
@media (max-width: 600px) {
  header h1 {
    font-size: 1.6rem;
  }

  nav a {
    display: inline-block;
    margin: 5px;
  }

  .project img {
    height: 150px;
  }

  .project p {
    font-size: 1rem;
  }
}

/* Animation */
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}
/* Contact Section - Fancy Cards */
.fancy-contact {
  max-width: 900px;
  margin: 40px auto 80px;
  padding: 0 20px;
  text-align: center;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 28px;
  margin-top: 30px;
}

.contact-card {
  background: linear-gradient(145deg, #ffffff, #e6e9f0);
  border-radius: 20px;
  padding: 30px 20px;
  box-shadow:
    8px 8px 15px #c1c5d0,
    -8px -8px 15px #ffffff;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  cursor: default;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.contact-card img {
  width: 50px;
  height: 50px;
  margin-bottom: 18px;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,0.1));
  transition: transform 0.3s ease;
}

.contact-card h3 {
  color: #4e54c8;
  font-weight: 600;
  margin-bottom: 12px;
  font-size: 1.3rem;
}

.contact-card p {
  color: #333;
  font-size: 1.05rem;
  line-height: 1.4;
}

.contact-card a {
  color: #4e54c8;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.contact-card a:hover {
  color: #8f94fb;
}

/* Hover Effect on Cards */
.contact-card:hover {
  transform: translateY(-12px) scale(1.05);
  box-shadow:
    15px 15px 25px #bcc2db,
    -15px -15px 25px #ffffff;
}

.contact-card:hover img {
  transform: rotate(15deg) scale(1.1);
}

/* Responsive tweak */
@media (max-width: 500px) {
  .contact-card {
    padding: 25px 15px;
  }

  .contact-card img {
    width: 40px;
    height: 40px;
  }
}