:root {
  --primary-color: #89b4fa; /* Blue */
  --secondary-color: #94e2d5; /* Teal */
  --accent-color: #cba6f7; /* Mauve */
  --bg-dark: #1e1e2e; /* Base */
  --bg-darker: #11111b; /* Crust */
  --text-main: #cdd6f4; /* Text */
  --text-muted: #a6adc8; /* Subtext0 */
  --glass-bg: rgba(24, 24, 37, 0.6); /* Mantle with opacity */
  --glass-border: rgba(180, 190, 254, 0.1); /* Lavender border */
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-darker);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
}

h1,
h2,
h3,
.logo {
  font-family: 'Outfit', sans-serif;
}

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

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

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

/* Background Grid Effect */
.background-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: linear-gradient(var(--glass-border) 1px, transparent 1px),
    linear-gradient(90deg, var(--glass-border) 1px, transparent 1px);
  background-size: 50px 50px;
  mask-image: radial-gradient(circle at center, black, transparent 80%);
  -webkit-mask-image: radial-gradient(circle at center, black, transparent 80%);
  z-index: -1;
  pointer-events: none;
  opacity: 0.5;
}

/* Navbar */
header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  backdrop-filter: blur(10px);
  background: rgba(2, 6, 23, 0.8);
  border-bottom: 1px solid var(--glass-border);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.logo-link {
  text-decoration: none;
  color: inherit;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2.5rem;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: var(--text-main);
}

.mobile-menu-btn {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Hero Section */
.hero {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hero h1 {
  font-size: 4.5rem;
  margin-bottom: 1.5rem;
  line-height: 1.1;
}

.highlight {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 700px;
  margin: 0 auto 2.5rem;
}

.hero-btns {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
}

.btn {
  padding: 0.8rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.3s, box-shadow 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  color: var(--bg-darker);
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(137, 180, 250, 0.3);
}

.btn-primary:hover {
  color: var(--bg-darker);
  background: linear-gradient(
    135deg,
    var(--secondary-color),
    var(--primary-color)
  );
  box-shadow: 0 8px 25px rgba(137, 180, 250, 0.5);
}

.btn-secondary {
  background: var(--glass-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--text-main);
  border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--text-main);
}

.btn:hover {
  transform: translateY(-3px) scale(1.02);
}

/* Projects Section */
.projects {
  padding: 100px 0;
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 4rem;
  text-align: center;
}

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

.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  box-shadow: var(--glass-shadow);
}

.project-card {
  padding: 2rem 1.5rem;
  transition: transform 0.3s, border-color 0.3s;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-10px);
  border-color: var(--primary-color);
}

.project-icon {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.project-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.project-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.8rem;
}

.project-card p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  flex-grow: 1; /* Pushes links to the bottom */
}

.project-links {
  margin-top: auto;
}

.project-link {
  color: var(--secondary-color);
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

/* Stats Banner */
.stats-banner {
  display: flex;
  justify-content: space-around;
  padding: 3rem;
  margin-top: 50px;
}

.stat-item {
  text-align: center;
}

.stat-count {
  display: block;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-main);
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Content Page Styling */
.content-page {
  padding-top: 120px;
  padding-bottom: 80px;
  max-width: 900px;
}

.case-study-content h2,
.case-study-content h3 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--text-main);
}

.case-study-content p {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

.blog-post-meta {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  display: flex;
  gap: 1rem;
}

/* Footer */
footer {
  padding: 50px 0;
  border-top: 1px solid var(--glass-border);
  margin-top: 100px;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-info p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-links {
  margin-top: 0.5rem;
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.8rem;
}

.social-links {
  display: flex;
  gap: 1.5rem;
}

.social-links a {
  color: var(--text-muted);
  font-size: 1.2rem;
  transition: color 0.3s;
}

.social-links a:hover {
  color: var(--text-main);
}

/* Animations */
.fade-in {
  animation: fadeIn 1s ease-out forwards;
}

.fade-in-delay {
  opacity: 0;
  animation: fadeIn 1s ease-out 0.3s forwards;
}

.fade-in-delay-2 {
  opacity: 0;
  animation: fadeIn 1s ease-out 0.6s forwards;
}

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

/* Mobile Responsive */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .mobile-menu-btn {
    display: block;
  }

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

  .hero-btns {
    flex-direction: column;
    gap: 1rem;
  }

  .footer-content {
    flex-direction: column;
    gap: 2rem;
    text-align: center;
  }
}
