:root {
  --primary: #6c63ff;
  --primary-dark: #564fcc;
  --secondary: #ff6584;
  --dark: #1a1a2e;
  --darker: #16213e;
  --light: #f8f9fa;
  --gray: #6c757d;
  --success: #28a745;
  --warning: #fd7e14;
  --danger: #dc3545;
  --info: #17a2b8;

  --font-main: "Space Grotesk", sans-serif;
  --font-secondary: "Poppins", sans-serif;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1), 0 5px 10px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.15), 0 10px 10px rgba(0, 0, 0, 0.05);

  --glass: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(255, 255, 255, 0.2);
  --glass-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  --glass-blur: blur(10px);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-secondary);
  background-color: var(--darker);
  color: var(--light);
  line-height: 1.6;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-main);
  font-weight: 600;
  line-height: 1.2;
}

a {
  text-decoration: none;
  color: inherit;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 50px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  font-family: var(--font-main);
}

.btn-primary {
  background-color: var(--primary);
  color: white;
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.btn-outline {
  background-color: transparent;
  color: var(--light);
  border: 2px solid var(--light);
}

.btn-outline:hover {
  background-color: var(--light);
  color: var(--dark);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.section {
  padding: 100px 0;
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 60px;
  height: 4px;
  background: var(--primary);
  border-radius: 2px;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--gray);
  margin-bottom: 3rem;
  max-width: 700px;
}

.text-gradient {
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Header Styles */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 20px 0;
  transition: all 0.3s ease;
}

header.scrolled {
  background-color: rgba(26, 26, 46, 0.9);
  backdrop-filter: blur(10px);
  padding: 15px 0;
  box-shadow: var(--shadow-md);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.8rem;
  font-weight: 700;
  font-family: var(--font-main);
}

.logo span {
  color: var(--primary);
}

.nav-links {
  display: flex;
  list-style: none;
}

.nav-links li {
  margin-left: 30px;
}

.nav-links a {
  font-weight: 500;
  position: relative;
  transition: all 0.3s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary);
  transition: width 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-links a.active::after {
  width: 100%;
}

.hamburger {
  display: none;
  cursor: pointer;
}

.hamburger div {
  width: 25px;
  height: 3px;
  background-color: var(--light);
  margin: 5px;
  transition: all 0.3s ease;
}

/* Portfolio Hero */
.portfolio-hero {
  height: 60vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, var(--darker), var(--dark));
  position: relative;
  overflow: hidden;
  margin-top: 80px;
}

.portfolio-hero-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  z-index: 10;
  position: relative;
}

.portfolio-hero-title {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.portfolio-hero-subtitle {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  color: rgba(255, 255, 255, 0.8);
}

/* Portfolio Grid */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.portfolio-grid-item {
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  height: 350px;
}

.portfolio-grid-item:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-xl);
}

.portfolio-grid-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.portfolio-grid-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(26, 26, 46, 0.9), transparent);
  padding: 20px;
  transform: translateY(100%);
  transition: all 0.3s ease;
}

.portfolio-grid-item:hover .portfolio-grid-overlay {
  transform: translateY(0);
}

.portfolio-grid-title {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.portfolio-grid-category {
  color: var(--primary);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  display: block;
}

.portfolio-grid-links {
  display: flex;
  gap: 15px;
}

.portfolio-grid-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.portfolio-grid-links a:hover {
  background-color: var(--primary);
  transform: translateY(-3px);
}

/* Portfolio Filter */
.portfolio-filter {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 40px;
}

.portfolio-filter-btn {
  padding: 8px 20px;
  background-color: transparent;
  border: 1px solid var(--gray);
  color: var(--light);
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.portfolio-filter-btn.active,
.portfolio-filter-btn:hover {
  background-color: var(--primary);
  border-color: var(--primary);
  color: white;
}

/* Project Details Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 2000;
  overflow-y: auto;
  padding: 50px 0;
}

.modal-content {
  background-color: var(--dark);
  max-width: 900px;
  margin: 0 auto;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  position: relative;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
}

.modal-close:hover {
  background-color: var(--primary);
}

.modal-header {
  height: 400px;
  position: relative;
  overflow: hidden;
}

.modal-header-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-body {
  padding: 40px;
}

.modal-title {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.modal-subtitle {
  color: var(--primary);
  margin-bottom: 1.5rem;
  display: block;
  font-size: 1.1rem;
}

.modal-description {
  margin-bottom: 2rem;
  line-height: 1.7;
}

.modal-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 2rem;
}

.modal-detail-item h4 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: var(--gray);
}

.modal-detail-item p {
  font-size: 1.1rem;
}

.modal-tech-stack {
  margin-bottom: 2rem;
}

.modal-tech-stack h3 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

.modal-tech-stack-items {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.modal-tech-stack-item {
  background-color: rgba(108, 99, 255, 0.1);
  padding: 8px 15px;
  border-radius: 50px;
  font-size: 0.9rem;
}

.modal-gallery {
  margin-bottom: 2rem;
}

.modal-gallery h3 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

.modal-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 15px;
}

.modal-gallery-item {
  height: 200px;
  border-radius: 5px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
}

.modal-gallery-item:hover {
  transform: scale(1.02);
}

.modal-gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-actions {
  display: flex;
  gap: 15px;
  margin-top: 2rem;
}

/* New: Action Buttons Styles */
.modal-engagement {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  color: var(--light);
  cursor: pointer;
  font-family: var(--font-secondary);
  font-size: 0.95rem;
  transition: all 0.3s ease;
  padding: 8px 15px;
  border-radius: 50px;
  background-color: rgba(255, 255, 255, 0.05);
}

.action-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.action-btn.liked {
  color: var(--secondary);
}

.action-btn.favorited {
  color: var(--warning);
}

.action-btn .count {
  font-size: 0.85rem;
  color: var(--gray);
}

.action-btn:hover .count {
  color: var(--light);
}

.action-btn.liked .count,
.action-btn.favorited .count {
  color: inherit;
}

.views-count {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--gray);
  font-size: 0.95rem;
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background-color: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 999;
}

.back-to-top.active {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background-color: var(--primary-dark);
  transform: translateY(-5px);
}

/* Footer */
footer {
  background-color: var(--dark);
  padding: 50px 0 20px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

.footer-logo {
  font-size: 1.8rem;
  font-weight: 700;
  font-family: var(--font-main);
  margin-bottom: 1rem;
}

.footer-logo span {
  color: var(--primary);
}

.footer-about p {
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 1.5rem;
}

.social-links {
  display: flex;
  gap: 15px;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.social-link:hover {
  background-color: var(--primary);
  transform: translateY(-3px);
}

.footer-links h3 {
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
  position: relative;
}

.footer-links h3::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 40px;
  height: 3px;
  background-color: var(--primary);
  border-radius: 2px;
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  transition: all 0.3s ease;
}

.footer-links a:hover {
  color: var(--primary);
  padding-left: 5px;
}

.footer-newsletter p {
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 1.5rem;
}

.newsletter-form {
  display: flex;
}

.newsletter-input {
  flex: 1;
  padding: 12px 15px;
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 5px 0 0 5px;
  color: var(--light);
  font-family: var(--font-secondary);
}

.newsletter-input:focus {
  outline: none;
  border-color: var(--primary);
}

.newsletter-btn {
  padding: 0 20px;
  background-color: var(--primary);
  color: white;
  border: none;
  border-radius: 0 5px 5px 0;
  cursor: pointer;
  transition: all 0.3s ease;
}

.newsletter-btn:hover {
  background-color: var(--primary-dark);
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
}

/* Responsive Styles */
@media (max-width: 992px) {
  .portfolio-hero-title {
    font-size: 2.8rem;
  }

  .portfolio-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }

  .modal-engagement {
    flex-wrap: wrap;
    gap: 10px;
  }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 80px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 80px);
    background-color: var(--dark);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 30px;
    transition: all 0.5s ease;
  }

  .nav-links.active {
    left: 0;
  }

  .nav-links li {
    margin-left: 0;
  }

  .hamburger {
    display: block;
  }

  .hamburger.active div:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
  }

  .hamburger.active div:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active div:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
  }

  .portfolio-hero {
    height: 50vh;
    margin-top: 70px;
  }

  .portfolio-hero-title {
    font-size: 2.2rem;
  }

  .portfolio-hero-subtitle {
    font-size: 1rem;
  }

  .section {
    padding: 70px 0;
  }

  .section-title {
    font-size: 2rem;
  }

  .modal-body {
    padding: 25px;
  }

  .modal-header {
    height: 300px;
  }
}

@media (max-width: 576px) {
  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .portfolio-hero-title {
    font-size: 1.8rem;
  }

  .modal-details {
    grid-template-columns: 1fr;
  }

  .modal-actions {
    flex-direction: column;
  }
}
