/* Base Styles */
:root {
  --primary: #3b82f6;
  --accent: #10b981;
  --background: #ffffff;
  --foreground: #1e293b;
  --card: #ffffff;
  --card-foreground: #1e293b;
  --border: #e2e8f0;
  --muted: #f1f5f9;
  --muted-foreground: #64748b;
  --radius: 0.5rem;
}

.dark-mode {
  --background: #1e293b;
  --foreground: #f8fafc;
  --card: #0f172a;
  --card-foreground: #f8fafc;
  --border: #334155;
  --muted: #1e293b;
  --muted-foreground: #94a3b8;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", sans-serif;
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  transition: background-color 0.3s, color 0.3s;
}

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

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

h3 {
  font-size: 1.5rem;
}

p {
  margin-bottom: 1rem;
}

.text-primary {
  color: var(--primary);
}

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

.section-desc {
  color: var(--muted-foreground);
  margin-bottom: 2.5rem;
  max-width: 48rem;
}

/* Header & Navigation */
header {
  padding: 1.5rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--background);
  border-bottom: 1px solid var(--border);
}

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

.logo {
  font-size: 1.5rem;
  font-weight: 700;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.nav-links a {
  position: relative;
  padding: 0.5rem 0;
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary);
  transition: width 0.3s;
}

.nav-links a:hover::after {
  width: 100%;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
}

.mobile-menu-btn span {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px 0;
  background-color: var(--foreground);
  transition: all 0.3s;
}

#theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--foreground);
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  position: relative;
}

#theme-toggle:hover {
  background-color: var(--muted);
}

#theme-toggle .fa-sun {
  position: absolute;
  opacity: 0;
  transform: rotate(-90deg) scale(0);
  transition: all 0.3s;
}

#theme-toggle .fa-moon {
  position: absolute;
  opacity: 1;
  transform: rotate(0) scale(1);
  transition: all 0.3s;
}

.dark-mode #theme-toggle .fa-sun {
  opacity: 1;
  transform: rotate(0) scale(1);
}

.dark-mode #theme-toggle .fa-moon {
  opacity: 0;
  transform: rotate(90deg) scale(0);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 0.875rem;
  gap: 0.5rem; /* Add gap between icon and text */
}

.btn-primary {
  background-color: var(--primary);
  color: white;
  border: 1px solid var(--primary);
  margin-bottom: 20px;
}

.btn-primary:hover {
  background-color: #2563eb;
  border-color: #2563eb;
}

.btn-outline {
  background-color: transparent;
  border: 1px solid var(--border);
  color: var(--foreground);
}

.btn-outline:hover {
  background-color: var(--muted);
  border-color: var(--primary);
  color: var(--primary);
}

/* Specific styles for GitHub buttons in project cards */
.project-footer .btn-outline {
  background-color: var(--background);
  border: 1px solid var(--primary);
  color: var(--primary);
  padding: 0.75rem 1rem;
  font-weight: 600;
  transition: all 0.2s ease;
  width: 100%; /* Make button full width */
  text-align: center;
  justify-content: center;
}

.project-footer .btn-outline:hover {
  background-color: var(--primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.project-footer .btn-outline i {
  font-size: 1rem;
}

.btn-ghost {
  background-color: transparent;
  border: none;
  color: var(--foreground);
  width: 100%;
  text-align: center;
  padding: 0.75rem 1rem;
  font-weight: 500;
}

.btn-ghost:hover {
  background-color: var(--muted);
  color: var(--primary);
}

.btn-block {
  width: 100%;
  margin-bottom: 10px;
}

.btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
}

.button-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Badge */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  background-color: var(--muted);
  color: var(--muted-foreground);
  border: 1px solid var(--border);
}

/* Tags */
.tag {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius);
  font-size: 0.75rem;
  font-weight: 500;
  background-color: var(--muted);
  color: var(--muted-foreground);
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
}

/* Cards */
.card {
  background-color: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: box-shadow 0.3s, transform 0.3s;
  height: 100%; /* Make cards equal height */
  display: flex;
  flex-direction: column;
}

.card:hover {
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

.card-header {
  padding: 1.5rem 1.5rem 0.5rem;
}

.card-body {
  padding: 0.5rem 1.5rem;
  flex-grow: 1; /* Allow body to grow and push footer to bottom */
  color: var(--muted-foreground);
  font-size: 1rem;
  line-height: 1.6;
}

.card-footer {
  padding: 1rem 1.5rem 1.5rem;
}

.card-date {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-top: 0.5rem;
  display: block;
}

/* Hero Section */
.hero {
  padding: 5rem 0;
  text-align: center;
  max-width: 48rem;
  margin: 0 auto;
}

.hero h1 {
  margin-bottom: 1rem;
}

.hero h2 {
  font-size: 1.25rem;
  color: var(--muted-foreground);
  font-weight: 500;
  margin-bottom: 1.5rem;
}

.hero p {
  margin-bottom: 2rem;
  color: var(--muted-foreground);
  font-size: 1.125rem;
  line-height: 1.7;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--muted);
  color: var(--foreground);
  transition: all 0.3s;
}

.social-links a:hover {
  background-color: var(--primary);
  color: white;
}

/* About Section */
.about {
  padding: 5rem 0;
}

.about-content {
  display: flex;
  gap: 3rem;
  align-items: center;
}

.about-text {
  flex: 1;
}

.about-text p {
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 1.25rem;
  color: var(--foreground);
}

.about-image {
  flex: 1;
  display: flex;
  justify-content: center;
}

.profile-image {
  width: 16rem;
  height: 16rem;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--primary);
}

.profile-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Projects Section */
.projects {
  padding: 5rem 0;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.project-card {
  background-color: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: box-shadow 0.3s, transform 0.3s;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
  transform: translateY(-5px);
}

.project-image {
  height: 12rem;
  overflow: hidden;
}


.profile-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%; /* Push image down to show more head */
  transition: filter 0.3s ease;
}
.project-image img:hover {
  filter: brightntess(-0.5);

}

.project-card:hover .project-image img {
  transform: scale(1.05);
}

.project-header {
  padding: 1.5rem 1.5rem 0.5rem;
}
.project-image img{
  object-fit: fill;
}
.project-tags {
  display: flex;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.project-body {
  padding: 0.5rem 1.5rem;
  color: var(--foreground);
  font-size: 1rem;
  line-height: 1.6;
  flex-grow: 1;
}

.project-footer {
  padding: 1rem 1.5rem 1.5rem;
}

/* Skills Section */
.skills {
  padding: 5rem 0;
}

.skills-cloud {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  padding: 2.5rem 0;
}

.skill-badge {
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-weight: 500;
  color: white;
  cursor: default;
  transition: all 0.3s;
}

.skill-badge:hover {
  transform: translateY(-5px);
}

.skill-backend {
  background-color: #3b82f6;
}

.skill-frontend {
  background-color: #10b981;
}

.skill-ml {
  background-color: #8b5cf6;
}

.skill-dsa {
  background-color: #f59e0b;
}

.skill-devops {
  background-color: #ef4444;
}

.skill-tools {
  background-color: #6b7280;
}

/* Blog Section */
.blog {
  padding: 5rem 0;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.blog-message {
  text-align: center;
  padding: 3rem;
  background-color: var(--muted);
  border-radius: var(--radius);
  color: var(--foreground);
  font-size: 1.1rem;
  margin-top: 1rem;
}

.blog-post-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--foreground);
}

.blog-post-excerpt {
  color: var(--foreground);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

/* Now Section */
.now {
  padding: 5rem 0;
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.timeline-item {
  position: relative;
  padding: 1.5rem;
  border-radius: var(--radius);
  background-color: var(--card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.timeline-tags {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.timeline-body {
  color: var(--foreground);
  font-size: 1rem;
  line-height: 1.6;
}

/* Contact Section */
.contact {
  padding: 5rem 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.05rem;
}

.contact-item a:hover {
  color: var(--primary);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.875rem;
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  padding: 0.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background-color: var(--background);
  color: var(--foreground);
  font-family: inherit;
  resize: none;
  font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
}

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
}

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

.footer-text {
  color: var(--muted-foreground);
}

.footer-social {
  display: flex;
  gap: 1rem;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--muted);
  color: var(--foreground);
  transition: all 0.3s;
}

.footer-social a:hover {
  background-color: var(--primary);
  color: white;
}

/* Blog Post Page */
.blog-post {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 0;
}

.blog-post-header {
  margin-bottom: 2rem;
}

.blog-post-header h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.blog-post-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--muted-foreground);
  margin-bottom: 1.5rem;
}

.blog-post-meta .date {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.blog-post-content {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--foreground);
}

.blog-post-content p {
  margin-bottom: 1.5rem;
}

.blog-post-content h2 {
  font-size: 1.8rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.blog-post-content h3 {
  font-size: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.blog-post-content ul,
.blog-post-content ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.blog-post-content li {
  margin-bottom: 0.5rem;
}

.blog-post-content img {
  max-width: 100%;
  border-radius: var(--radius);
  margin: 2rem 0;
}

.blog-post-content code {
  background-color: var(--muted);
  padding: 0.2rem 0.4rem;
  border-radius: 0.25rem;
  font-family: "Fira Code", monospace;
  font-size: 0.9rem;
}

.blog-post-content pre {
  background-color: var(--muted);
  padding: 1rem;
  border-radius: var(--radius);
  overflow-x: auto;
  margin-bottom: 1.5rem;
}

.blog-post-content pre code {
  background-color: transparent;
  padding: 0;
}

.blog-post-content blockquote {
  border-left: 4px solid var(--primary);
  padding-left: 1rem;
  margin-left: 0;
  margin-right: 0;
  margin-bottom: 1.5rem;
  font-style: italic;
  color: var(--muted-foreground);
}

.back-to-blog {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  color: var(--primary);
  font-weight: 500;
}

.back-to-blog:hover {
  text-decoration: underline;
}

/* Responsive Styles */
@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background-color: var(--background);
    padding: 1rem;
    border-bottom: 1px solid var(--border);
  }

  .nav-links.active {
    display: flex;
  }

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

  .about-content {
    flex-direction: column;
  }

  .contact-grid,
  .blog-grid,
  .project-grid {
    grid-template-columns: 1fr;
  }

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

/* Animation Keyframes */
@keyframes float {
  0% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(10px, -10px);
  }
  100% {
    transform: translate(0, 0);
  }
}
