
/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Fira+Code:wght@300;400;500&display=swap');

/* CSS Variables for Light Theme */
:root {
  --primary-color: #22c55e;
  --primary-dark: #16a34a;
  --secondary-color: #f8fafc;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --background: #ffffff;
  --card-background: #f8fafc;
  --border-color: #e2e8f0;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

/* Dark Theme Variables */
@media (prefers-color-scheme: dark) {
  :root {
    --primary-color: #22c55e;
    --primary-dark: #16a34a;
    --secondary-color: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --background: #0f172a;
    --card-background: #1e293b;
    --border-color: #334155;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
  }
}

/* Global Styling for All Links */
a {
  color: var(--primary-color); /* or use a hex code like #4CAF50 */
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--primary-color-dark); /* or a slightly darker green */
  text-decoration: underline;
}


/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--background);
  color: var(--text-primary);
  line-height: 1.6;
  transition: var(--transition);
}

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

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

.logo {
  font-family: 'Fira Code', monospace;
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--primary-color);
}

.tagline {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.section {
  padding: 4rem 0;
}

/* Header */
header {
  background-color: var(--background);
  border-bottom: 1px solid var(--border-color);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: var(--transition);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

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

.nav-links a {
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

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

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

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

/* Hero Section */
.hero {
  padding: 8rem 0 4rem;
  text-align: center;
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero .tagline {
  font-size: 1.5rem;
  margin-bottom: 3rem;
}

.cta-button {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background-color: var(--primary-color);
  color: white;
  text-decoration: none;
  font-weight: bold;
  border-radius: 8px;
  border: 2px solid transparent;
  transition: all 0.3s ease;
}

.cta-button:hover {
  background-color: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  transform: translateY(-2px);
}



/* Cards */
.card {
  background-color: var(--card-background);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 2rem;
  transition: var(--transition);
  box-shadow: var(--shadow);
}

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

.card h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.card p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

/* Grid Layouts */
.grid {
  display: grid;
  gap: 2rem;
}

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

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* About Section */
.about-content {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3rem;
  align-items: center;
}

.profile-img {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  border: 4px solid var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden; /* ensures the image doesn’t overflow the circle */
  background-color: var(--secondary-color); /* optional */
}

.profile-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%; /* ensures the image itself is circular */
}

.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.skill-tag {
  background-color: var(--primary-color);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.875rem;
  font-weight: 500;
}

/* Projects */
.project-card {
  position: relative;
  overflow: hidden;
}

.project-img {
  width: 100%;
  max-width: 400px;
  height: 200px;
  background-color: var(--secondary-color);
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden; /* ensures nothing spills out */
  position: relative;
}

.project-img img {
  width: 400px;
  height: 200px;
  object-fit: cover; /* keeps the image nicely filled */
  border-radius: 0.5rem;
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.tech-tag {
  background-color: var(--border-color);
  color: var(--text-primary);
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
}

/* Blog */
.blog-card {
  border-left: 4px solid var(--primary-color);
}

.blog-meta {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

/* Contact Form */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  background-color: var(--card-background);
  color: var(--text-primary);
  font-family: inherit;
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.checkbox-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.checkbox-group input[type="checkbox"] {
  width: auto;
}

.contact-info {
  background-color: var(--card-background);
  padding: 2rem;
  border-radius: 1rem;
  border: 1px solid var(--border-color);
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.contact-item:last-child {
  margin-bottom: 0;
}

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

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background-color: var(--card-background);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  text-decoration: none;
  color: var(--text-primary);
  transition: var(--transition);
}

.social-link:hover {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-2px);
}

.social-link i {
  font-size: 1.5rem;
}


/* Footer */
footer {
  background-color: var(--card-background);
  border-top: 1px solid var(--border-color);
  padding: 2rem 0;
  text-align: center;
  margin-top: 4rem;
}

footer p {
  color: var(--text-secondary);
}

/* Mobile Navigation */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-primary);
  cursor: pointer;
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }
  
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .hero .tagline {
    font-size: 1.2rem;
  }
  
  .nav-links {
    display: none;
  }
  
  .mobile-menu-toggle {
    display: block;
  }
  
  .about-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .profile-img {
    justify-self: center;
  }
  
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
  
  .section {
    padding: 2rem 0;
  }
  
  .hero {
    padding: 6rem 0 2rem;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 2rem;
  }
  
  .card {
    padding: 1.5rem;
  }
  
  .profile-img {
    width: 200px;
    height: 200px;
  }
}

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

.fade-in {
  animation: fadeIn 0.6s ease-out;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
