/* 
  Portfolio Website Styles
  A clean, minimal design with responsive features
*/

/* CSS Variables for consistent theming - Light & Dark Mode */
:root {
  /* Light Mode - Default */
  --color-primary: #6a11cb;
  --color-secondary: #2575fc;
  --color-text: #1f2937;
  --color-background: #ffffff;
  --color-border: #e5e7eb;
  --color-highlight: #38bdf8;
  --color-accent: #f3f4f6;
  --color-accent-dark: #f0f9ff;
  --color-success: #10b981;
  --color-gradient-1: #6a11cb;
  --color-gradient-2: #2575fc;
  --color-gradient-3: #38bdf8;
  --color-card-bg: rgba(255, 255, 255, 0.8);
  --color-card-border: rgba(229, 231, 235, 0.5);
  --color-header-bg: rgba(255, 255, 255, 0.8);
  --color-input-bg: rgba(243, 244, 246, 0.5);
  --color-tag-bg: #f0f0f0;
  --color-overlay: rgba(255, 255, 255, 0.7);
  
  /* Typography */
  --font-heading: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  --font-size-base: 1rem;
  --font-size-sm: 0.875rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --line-height-normal: 1.6;
  --letter-spacing-tight: -0.025em;
  --letter-spacing-normal: 0em;
  --letter-spacing-wide: 0.025em;
  
  /* Effects */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --shadow-sm: 0 2px 4px rgba(106, 17, 203, 0.05);
  --shadow-md: 0 4px 6px rgba(106, 17, 203, 0.1), 0 2px 4px rgba(37, 117, 252, 0.06);
  --shadow-lg: 0 10px 25px rgba(106, 17, 203, 0.1), 0 4px 10px rgba(37, 117, 252, 0.05);
  --border-radius: 0.75rem;
  --border-radius-sm: 0.375rem;
  --border-radius-lg: 1rem;
  --blur-sm: blur(4px);
  --blur-md: blur(8px);
  --blur-lg: blur(16px);
}

/* Dark Mode Variables */
[data-theme='dark'] {
  --color-primary: #8b5cf6;
  --color-secondary: #3b82f6;
  --color-text: #e5e7eb;
  --color-background: #111827;
  --color-border: #374151;
  --color-highlight: #60a5fa;
  --color-accent: #1f2937;
  --color-accent-dark: #111827;
  --color-success: #10b981;
  --color-gradient-1: #8b5cf6;
  --color-gradient-2: #3b82f6; 
  --color-gradient-3: #60a5fa;
  --color-card-bg: rgba(31, 41, 55, 0.8);
  --color-card-border: rgba(75, 85, 99, 0.5);
  --color-header-bg: rgba(17, 24, 39, 0.8);
  --color-input-bg: rgba(55, 65, 81, 0.5);
  --color-tag-bg: #374151;
  --color-overlay: rgba(17, 24, 39, 0.7);
}

/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  line-height: var(--line-height-normal);
  color: var(--color-text);
  background-color: var(--color-background);
  background-image: 
    radial-gradient(circle at 10% 10%, rgba(106, 17, 203, 0.03) 0%, transparent 20%),
    radial-gradient(circle at 90% 30%, rgba(37, 117, 252, 0.03) 0%, transparent 25%),
    radial-gradient(circle at 50% 70%, rgba(56, 189, 248, 0.03) 0%, transparent 30%);
  background-attachment: fixed;
  transition: background-color 0.5s ease, color 0.5s ease;
}

/* Dark mode background adjustments */
[data-theme='dark'] body {
  background-image: 
    radial-gradient(circle at 10% 10%, rgba(139, 92, 246, 0.06) 0%, transparent 20%),
    radial-gradient(circle at 90% 30%, rgba(59, 130, 246, 0.06) 0%, transparent 25%),
    radial-gradient(circle at 50% 70%, rgba(96, 165, 250, 0.06) 0%, transparent 30%);
}

a {
  text-decoration: none;
  color: var(--color-primary);
  transition: var(--transition);
}

a:hover {
  color: var(--color-highlight);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.section {
  padding: 80px 0;
}

.section-title {
  font-size: 2.5rem;
  font-family: var(--font-heading);
  font-weight: 700;
  margin-bottom: 70px;
  text-align: center;
  position: relative;
  background: linear-gradient(135deg, var(--color-gradient-1) 0%, var(--color-gradient-2) 50%, var(--color-gradient-3) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientText 5s ease infinite;
}

@keyframes gradientText {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.section-title::after {
  content: '';
  position: absolute;
  width: 100px;
  height: 4px;
  background: linear-gradient(90deg, var(--color-gradient-1), var(--color-gradient-2), var(--color-gradient-3));
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 4px;
  box-shadow: 0 2px 10px rgba(106, 17, 203, 0.2);
}

.btn {
  display: inline-block;
  padding: 12px 28px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.9rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.primary-btn {
  background: linear-gradient(135deg, var(--color-gradient-1), var(--color-gradient-2), var(--color-gradient-3));
  background-size: 200% 200%;
  color: #fff;
  border: none;
  box-shadow: var(--shadow-md);
  animation: gradientShift 5s ease infinite;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
}

@keyframes gradientShift {
  0% { background-position: 0% 50% }
  50% { background-position: 100% 50% }
  100% { background-position: 0% 50% }
}

.primary-btn:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.secondary-btn {
  background-color: transparent;
  color: var(--color-primary);
  border: 2px solid transparent;
  background: 
    linear-gradient(var(--color-background), var(--color-background)) padding-box,
    linear-gradient(135deg, var(--color-gradient-1), var(--color-gradient-3)) border-box;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.secondary-btn:hover {
  color: #fff;
  transform: translateY(-3px);
  background: linear-gradient(135deg, var(--color-gradient-1), var(--color-gradient-2), var(--color-gradient-3));
}

.small-btn {
  padding: 8px 16px;
  font-size: 0.8rem;
  border: 1px solid var(--color-primary);
  color: var(--color-primary);
  background: transparent;
}

.small-btn:hover {
  background: var(--color-primary);
  color: #fff;
}

.highlight {
  color: var(--color-highlight);
}

.header {
  position: fixed;
  width: 100%;
  background-color: var(--color-header-bg);
  backdrop-filter: var(--blur-md);
  z-index: 1000;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.header.sticky {
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 10px 30px rgba(106, 17, 203, 0.05);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
}

.logo a {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
}

.nav-menu {
  display: flex;
}

.nav-menu li {
  margin-left: 30px;
}

.nav-link {
  font-weight: 500;
  font-size: 1rem;
  position: relative;
  padding-bottom: 5px;
}

.nav-link::before {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-gradient-1), var(--color-gradient-2), var(--color-gradient-3));
  bottom: 0;
  left: 0;
  transition: var(--transition);
}

.nav-link:hover::before,
.nav-link.active::before {
  width: 100%;
}

.hamburger {
  display: none;
  cursor: pointer;
}

.bar {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px auto;
  background-color: var(--color-primary);
  transition: var(--transition);
}

/* Home Section */
.home-section {
  height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.home-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.home-text {
  flex: 1;
}

.home-text h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 15px;
}

.tagline {
  font-size: 1.5rem;
  font-weight: 500;
  margin-bottom: 20px;
  color: var(--color-highlight);
}

.intro {
  font-size: 1.1rem;
  margin-bottom: 30px;
  max-width: 500px;
}

.cta-buttons {
  display: flex;
  gap: 15px;
}

.home-image {
  flex: 1;
  text-align: center;
}

/* --- UPDATED PROFILE PICTURE STYLE --- */
.profile-img {
  width: 350px; /* Set a fixed width */
  height: 350px; /* Set a fixed height to make it a square */
  border-radius: 50%; /* This makes the square a circle */
  object-fit: cover; /* This prevents the image from stretching */
  aspect-ratio: 1 / 1; /* Ensures the container is always a square */
  box-shadow: var(--shadow-lg);
  border: 5px solid transparent; /* Increased border thickness for a nicer look */
  background: linear-gradient(var(--color-background), var(--color-background)) padding-box,
              linear-gradient(135deg, var(--color-gradient-1), var(--color-gradient-3)) border-box;
  animation: float 5s ease-in-out infinite;
  position: relative; /* Needed for the pulse effect */
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-15px); }
  100% { transform: translateY(0px); }
}

/* Pulse animation for the glow effect */
.profile-img::after {
  content: '';
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-gradient-1), transparent, var(--color-gradient-3));
  z-index: -1;
  opacity: 0.3;
  filter: blur(15px);
  animation: pulse 4s ease-in-out infinite alternate;
}

@keyframes pulse {
  0% { opacity: 0.2; transform: scale(1); }
  100% { opacity: 0.4; transform: scale(1.05); }
}

.profile-img:hover {
  transform: scale(1.05) translateY(-10px);
  box-shadow: 0 25px 30px -5px rgba(106, 17, 203, 0.2), 0 15px 15px -5px rgba(37, 117, 252, 0.1);
}

/* About Section */
.about-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.about-text {
  padding: 30px;
  background: var(--color-overlay);
  border-radius: var(--border-radius);
  backdrop-filter: var(--blur-md);
  box-shadow: 0 10px 30px rgba(106, 17, 203, 0.05);
  border: 1px solid var(--color-card-border);
}

.about-text p {
  font-size: 1.1rem;
  line-height: 1.8;
}

/* Education Section */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  width: 2px;
  height: 100%;
  background: var(--color-border);
  left: 50%;
  transform: translateX(-50%);
}

.timeline-item {
  padding: 20px 0;
  position: relative;
}

.timeline-content {
  background: var(--color-card-bg);
  padding: 30px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  width: calc(50% - 40px);
  position: relative;
  border: 1px solid var(--color-card-border);
}

.timeline-item:nth-child(odd) .timeline-content {
  margin-left: auto;
}

.timeline-content::before {
  content: '';
  position: absolute;
  top: 20px;
  width: 15px;
  height: 15px;
  background: linear-gradient(135deg, var(--color-gradient-1), var(--color-gradient-2));
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(106, 17, 203, 0.1);
  animation: pulseTimeline 2s infinite;
}

.timeline-item:nth-child(odd) .timeline-content::before {
  left: -48px;
}

.timeline-item:nth-child(even) .timeline-content::before {
  right: -48px;
}

@keyframes pulseTimeline {
  0% { box-shadow: 0 0 0 0 rgba(106, 17, 203, 0.2); }
  70% { box-shadow: 0 0 0 10px rgba(106, 17, 203, 0); }
  100% { box-shadow: 0 0 0 0 rgba(106, 17, 203, 0); }
}

.timeline-content h3 {
  font-weight: 600;
  margin-bottom: 5px;
}

.timeline-content h4 {
  font-weight: 500;
  margin-bottom: 10px;
  color: #666;
}

.timeline-date {
  font-style: italic;
  color: #888;
  margin-bottom: 15px;
}

/* Skills Section */
.skills-container {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.skill-category h3 {
  font-size: 1.3rem;
  margin-bottom: 20px;
  text-align: center;
}

.skills-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
}

.skill-tag {
  background: var(--color-tag-bg);
  padding: 10px 20px;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(106, 17, 203, 0.06);
  transition: var(--transition-bounce);
}

.skill-tag:hover {
  transform: translateY(-4px);
  box-shadow: 0 5px 15px rgba(106, 17, 203, 0.15);
  background: var(--color-primary);
  color: #fff;
}

/* Projects & Blog Section */
.projects-grid, .blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.project-card {
  background: var(--color-card-bg);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition-bounce);
  border: 1px solid var(--color-card-border);
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
}

.project-image {
  height: 200px;
  overflow: hidden;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.5s ease;
}

.project-card:hover .project-image img {
  transform: scale(1.05);
}

.project-info {
  padding: 25px;
}

.project-info h3 {
  margin-bottom: 10px;
  font-weight: 600;
}

.project-info p {
  margin-bottom: 20px;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.project-tags span {
  background-color: var(--color-tag-bg);
  padding: 5px 12px;
  border-radius: 4px;
  font-size: 0.8rem;
}

.project-links {
  display: flex;
  gap: 10px;
}

/* Footer */
.footer {
  text-align: center;
  padding: 40px 0;
  margin-top: 60px;
  border-top: 1px solid var(--color-border);
}

/* Theme Toggle Styles */
.theme-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-gradient-1), var(--color-gradient-3));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1000;
  box-shadow: var(--shadow-md);
  border: none;
}

.theme-toggle i {
  font-size: 1.5rem;
}

.theme-toggle .sun { display: none; }
[data-theme='dark'] .theme-toggle .sun { display: block; }
[data-theme='dark'] .theme-toggle .moon { display: none; }

/* Responsive Styles */
@media (max-width: 992px) {
  .home-content {
    flex-direction: column-reverse;
    text-align: center;
  }
  .home-text { margin-top: 40px; }
  .intro { margin: 0 auto 30px; }
  .cta-buttons { justify-content: center; }
  .timeline::before { left: 20px; }
  .timeline-content { width: calc(100% - 60px); margin-left: 60px !important; }
  .timeline-item:nth-child(odd) .timeline-content::before,
  .timeline-item:nth-child(even) .timeline-content::before { left: -28px; right: auto; }
}

@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    left: -100%;
    top: 70px;
    flex-direction: column;
    background-color: var(--color-card-bg);
    width: 100%;
    text-align: center;
    box-shadow: var(--shadow-lg);
    padding: 20px 0;
    transition: 0.3s;
  }
  
  .nav-menu.active { left: 0; }
  .nav-menu li { margin: 15px 0; }
  .hamburger { display: block; }
  
  .hamburger.active .bar:nth-child(2) { opacity: 0; }
  .hamburger.active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .hamburger.active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
  
  .home-section { height: auto; padding: 120px 0 80px; }

  /* --- UPDATED PROFILE PICTURE FOR MOBILE --- */
  .profile-img {
    width: 250px; /* Make it smaller on tablets */
    height: 250px;
  }
}

@media (max-width: 576px) {
  /* --- UPDATED PROFILE PICTURE FOR PHONES --- */
  .profile-img {
    width: 200px; /* Even smaller on phones */
    height: 200px;
  }
}

/* Contact Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(17, 24, 39, 0.8);
  backdrop-filter: var(--blur-md);
  -webkit-backdrop-filter: var(--blur-md);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  display: flex;
  opacity: 1;
}

.modal-content {
  background-color: #1f2937;
  padding: 40px;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
  position: relative;
  width: 90%;
  max-width: 500px;
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  background: none;
  border: none;
  color: var(--color-text);
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
  transition: all 0.2s ease;
}

.modal-close:hover {
    color: var(--color-highlight);
    transform: rotate(90deg);
}

.modal-content h2 {
  font-size: 2rem;
  margin-bottom: 30px;
  text-align: center;
  color: #fff;
}

.contact-info-modal .contact-item {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  padding: 20px;
  border-radius: var(--border-radius);
  background-color: #111827;
  transition: all 0.3s ease;
}

.contact-info-modal .contact-item:hover {
    transform: translateX(5px);
    background-color: #374151;
}

.contact-info-modal .contact-item i {
  font-size: 1.5rem;
  margin-right: 20px;
  color: var(--color-primary);
}

.contact-info-modal .contact-item p {
    font-size: 1.1rem;
    color: var(--color-text);
    margin: 0;
}

/* Add this to the end of your CSS file */

.github-btn {
  background: #333;
  color: #fff;
  border: 1px solid #333;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px; /* Adds space between the icon and the text */
}

.github-btn:hover {
  background: #111;
  border-color: #111;
  color: #fff;
}
