:root {
  --bg: #f5f5f5;
  --text: #222;
  --card-bg: #ffffff;
  --accent: #007acc;
}

body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  text-align: center;
  transition: background-color 0.5s ease, color 0.5s ease;
}

.hero {
  padding: 4rem 2rem;
  background-color: var(--card-bg);
  transition: background-color 0.5s ease;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.profile-pic {
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: 50%;
  margin-bottom: 1rem;
  border: 4px solid var(--accent);
  transition: border-color 0.4s ease;
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 1.4rem;
  color: var(--accent);
  margin-bottom: 1rem;
}

p {
  max-width: 600px;
  margin: 0.5rem auto;
  font-size: 1rem;
  line-height: 1.6;
}

/* --- Dark Mode Styles --- */
body.dark-mode {
  --bg: #121212;
  --text: #f5f5f5;
  --card-bg: #1e1e1e;
  --accent: #00bfff;
}

/* Theme toggle button */
#theme-toggle {
  position: fixed;
  top: 4.5rem;
  right: 1.2rem;
  background: var(--card-bg);
  color: var(--accent);
  font-size: 1.5rem;
  border: none;
  border-radius: 50%;
  padding: 0.5rem 0.6rem;
  cursor: pointer;
  transition: transform 0.3s ease, background-color 0.4s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

#theme-toggle:hover {
  transform: rotate(20deg) scale(1.1);
}

/* === Navbar === */
.navbar {
  position: sticky;
  top: 0;
  background-color: var(--card-bg);
  display: flex;
  justify-content: center;
  padding: 0.75rem 0;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  z-index: 1000;
  transition: background-color 0.3s;
}

.navbar ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  padding: 0;
  margin: 0;
}

.navbar a {
  text-decoration: none;
  color: var(--text);
  font-weight: bold;
  transition: color 0.2s;
}

.navbar a:hover {
  color: var(--accent);
}

/* === Typing Animation === */
.cursor {
  display: inline-block;
  color: var(--accent);
  animation: blink 0.7s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.projects {
  padding: 3rem 2rem;
}

.projects h1 {
  font-size: 2rem;
  margin-bottom: 2rem;
}

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

.project-card {
  background-color: var(--card-bg);
  color: var(--text);
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.project-card h3 {
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.project-card a {
  display: inline-block;
  margin-top: 1rem;
  color: var(--accent);
  font-weight: bold;
}

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

.skills {
  padding: 3rem 2rem;
  text-align: center;
}

.skills h1 {
  font-size: 2rem;
  margin-bottom: 2rem;
  color: var(--accent);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 2rem;
  justify-items: center;
}

.skill {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform 0.3s ease;
}

.skill:hover {
  transform: scale(1.1);
}

.skill img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  margin-bottom: 0.5rem;
}

.skill span {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
}

.skills {
  padding: 4rem 2rem;
  text-align: center;
}

.skills h1 {
  font-size: 2.5rem;
  margin-bottom: 2rem;
  color: var(--text-primary);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 2rem;
  justify-items: center;
  align-items: center;
  max-width: 1000px;
  margin: auto;
}

.skill {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: var(--card-shadow);
  transition: transform 0.3s ease;
}

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

.skill img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  margin-bottom: 0.5rem;
}

.skill span {
  display: block;
  margin-top: 0.5rem;
  font-weight: bold;
  color: var(--text-primary);
}
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.5rem;
  padding: 2rem;
  justify-items: center;
}

.skill {
  background-color: var(--card-bg, #fff);
  padding: 1rem;
  border-radius: 12px;
  text-align: center;
  transition: 0.3s ease-in-out;
  cursor: pointer;
  position: relative;
}

.skill:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 18px rgba(0, 200, 255, 0.4);
}

.skill img {
  width: 60px;
  height: 60px;
}

.skill span {
  display: block;
  margin-top: 0.5rem;
  font-weight: bold;
  font-size: 1rem;
}

/* Tooltip Styles */
.skill[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: -35px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #222;
  color: #fff;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  white-space: nowrap;
  z-index: 10;
  opacity: 1;
  pointer-events: none;
}

.skill[data-tooltip]::after {
  opacity: 0;
  transition: opacity 0.3s ease;
}
.resume {
  padding: 40px 20px;
  max-width: 800px;
  margin: auto;
}

.resume h1 {
  text-align: center;
  margin-bottom: 40px;
}

.resume-section {
  margin-bottom: 30px;
}

.resume-section h2 {
  margin-bottom: 10px;
  color: var(--primary);
}

.resume-section ul {
  list-style: disc;
  padding-left: 20px;
}

.download-btn {
  display: inline-block;
  background-color: var(--primary);
  color: white;
  padding: 10px 20px;
  text-decoration: none;
  border-radius: 8px;
  transition: 0.3s ease;
}

.download-btn:hover {
  background-color: var(--accent);
}

.resume {
  padding: 50px 20px;
  max-width: 900px;
  margin: auto;
  text-align: center;
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 50px;
  color: var(--primary);
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 40px;
  position: relative;
  padding-left: 20px;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  left: 30px;
  width: 4px;
  height: 100%;
  background: var(--accent);
}

.timeline-item {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 12px;
  padding: 20px 30px;
  margin-left: 50px;
  animation: fadeInUp 0.8s ease-out forwards;
  opacity: 0;
  transform: translateY(30px);
}

/* Scroll animation */
@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 600px) {
  .timeline::before {
    left: 15px;
  }

  .timeline-item {
    margin-left: 30px;
  }
}

.download-btn {
  background-color: var(--primary);
  color: white;
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  transition: 0.3s ease;
}

.download-btn:hover {
  background-color: var(--accent);
}
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  padding: 2rem;
}

.blog-card {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: transform 0.2s, box-shadow 0.3s;
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.2);
}

.blog-card a {
  color: inherit;
  text-decoration: none;
  display: block;
}

.blog-card h2 {
  margin-bottom: 0.5rem;
}

.blog-card .meta {
  font-size: 0.85rem;
  color: var(--text-muted);
}
/* Glass effect */
.glass-section, .glass-card, .glass-header {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px;
  background: transparent;
  border: none;
  border-bottom: 2px solid #ccc;
  color: #fff;
  outline: none;
  transition: border-color 0.3s;
}

.contact-form label {
  position: absolute;
  top: -20px;
  left: 0;
  font-size: 14px;
  color: #aaa;
  transition: all 0.3s ease;
}

.contact-form .form-group {
  position: relative;
  margin-bottom: 24px;
}

/* Hover glow */
.glow-hover {
  transition: box-shadow 0.3s ease;
}
.glow-hover:hover {
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.4);
}

/* Link styling */
.contact-info a {
  color: #00aaff;
  text-decoration: none;
}
.contact-info a:hover {
  text-decoration: underline;
}


/* === Responsive Fixes for Mobile Screens === */
@media (max-width: 768px) {
  .hero {
    padding: 2rem 1rem;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.2rem;
  }

  p {
    font-size: 0.95rem;
    padding: 0 1rem;
  }

  .profile-pic {
    width: 140px;
    height: 140px;
  }

  .navbar ul {
    flex-direction: column;
    gap: 1rem;
  }

  .navbar {
    flex-wrap: wrap;
    padding: 0.5rem;
  }

  #theme-toggle {
    top: 1rem;
    right: 1rem;
    font-size: 1.2rem;
    padding: 0.4rem 0.5rem;
  }

  .project-grid,
  .skills-grid,
  .blog-grid {
    grid-template-columns: 1fr;
    padding: 1rem;
  }

  .projects,
  .skills,
  .resume {
    padding: 2rem 1rem;
  }

  .resume h1,
  .projects h1,
  .skills h1 {
    font-size: 2rem;
  }

  .timeline::before {
    left: 20px;
  }

  .timeline-item {
    margin-left: 40px;
    padding: 15px 20px;
  }

  .contact-form input,
  .contact-form textarea {
    font-size: 0.95rem;
  }

  .download-btn {
    font-size: 0.9rem;
    padding: 8px 16px;
  }

  .glass-section,
  .glass-card,
  .glass-header {
    border-radius: 12px;
  }
}
