html {
  scroll-behavior: smooth;
}

:root {
  --bg-color: #0D1117;
  --text-color: #A4B1CD;
  --accent-color: #9FEF00;
  --gray: #a1a1aa;
  --highlight: #9FEF00;
  --card-bg: #1A2332;
}

body.light-mode {
  --bg-color: #ffffff;
  --text-color: #111111;
  --gray: #555;
  --card-bg: #f0f0f0;
}

body.dark-mode {
  --bg-color: #0D1117;
  --text-color: #fefeff;
  --gray: #a1a1aa;
  --card-bg: #1A2332;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: 'Inter', sans-serif;
  margin: 0;
  padding: 0;
  transition: background 0.3s, color 0.3s;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}
h2 {
  text-align: center;
}
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 1rem;
}

.main-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  padding: 1.5rem 1rem;
  background: var(--card-bg);
  border-radius: 1.5rem;
  box-shadow: 0 4px 24px rgba(56,189,248,0.07);
  margin: 2rem auto 3rem auto;
  max-width: 900px;
}

.nav-brand {
  font-weight: bold;
  font-size: 1.5rem;
  color: var(--accent-color);
  letter-spacing: 1px;
  margin-right: 2rem;
}

.nav-pills {
  list-style: none;
  display: flex;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

.nav-pills li {
  display: flex;
}

.nav-pills a {
  text-decoration: none;
  color: var(--text-color);
  font-weight: 500;
  font-size: 1.1rem;
  padding: 0.5rem 1.2rem;
  border-radius: 0.7rem;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  position: relative;
}

.nav-pills a[aria-current="page"] {
  background: var(--accent-color);
  color: #000;
  font-weight: 700;
  box-shadow: 0 2px 12px rgba(159, 239, 0, 0.2);
}

.nav-pills a:hover {
  background: var(--accent-color);
  color: #000;
  box-shadow: 0 2px 12px rgba(159, 239, 0, 0.12);
}

.toggle-btn {
  background: var(--card-bg);
  color: var(--text-color);
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  margin-left: 2rem;
}

section {
  margin-bottom: 5rem;
  padding: 0 1rem;
}

.hero-section {
  text-align: center;
  padding: 2rem;
  margin-bottom: 3.5rem;
}

.hero-section h1 {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.hero-section span {
  color: var(--accent-color);
}

.hero-section p {
  font-size: 1.3rem;
  color: var(--gray);
  margin-bottom: 2.5rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.primarylink,
.seclink {
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  text-decoration: none;
  font-weight: bold;
}

.primarylink {
  background: var(--accent-color);
  color: #000;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}

.primarylink:hover {
  background: var(--highlight);
  color: #000;
  transform: translateY(-3px) scale(1.06);
  box-shadow: 0 4px 16px rgba(159, 239, 0, 0.18);
}

.seclink {
  border: 1px solid var(--accent-color);
  color: var(--text-color);
  background: transparent;
  transition: background 0.2s, color 0.2s, transform 0.2s, border 0.2s;
}

.seclink:hover {
  background: var(--accent-color);
  color: #000;
  border-color: var(--highlight);
  transform: translateY(-3px) scale(1.06);
  box-shadow: 0 4px 16px rgba(159, 239, 0, 0.12);
}

.about-me {
  background: var(--card-bg);
  border-radius: 1rem;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
  padding: 1.2rem 2rem 2.5rem 2rem;
  transition: box-shadow 0.2s, transform 0.2s;
}

.about-me:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 4px 24px rgba(56,189,248,0.15);
}

.about-me h2 {
  margin-bottom: 1.5rem;
  text-align: center;
}

.about-me p,
.skills p,
.featured-projects p,
.blog-snippets p {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  color: var(--gray);
}

.skills-grid {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  flex-wrap: wrap;
  margin-top: 2rem;
  font-size: 2.5rem;
}

.skills-grid > div {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.skills-grid i {
  transition: transform 0.3s;
}

.skills-grid i:hover {
  transform: scale(1.2);
}

.skills-grid div div {
  font-size: 0.95rem;
  color: var(--text-color);
  margin-top: 0.3rem;
  font-weight: 400;
}

.project-preview {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 2rem;
}

.project-preview .card {
  flex: 1 1 300px;
  max-width: 400px;
  min-width: 280px;
}

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



.card {
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: 1rem;
  box-shadow: 0 0 10px rgba(0,0,0,0.2);
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: transform 0.2s ease-in-out;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 24px rgba(159, 239, 0, 0.15);
}

.card h1 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

.card p {
  color: var(--gray);
  margin: 0;
}

.card a {
  display: inline-block;
  margin-right: 1rem;
  text-decoration: none;
}

.card-buttons {
  display: flex;
  gap: 0.25rem;
  margin-top: 1rem;
}

.skills-grid img {
  transition: transform 0.3s, filter 0.3s;
  cursor: pointer;
}

.skills-grid img:hover {
  transform: scale(1.18) rotate(-6deg);
}

.see-all-projects {
  text-align: center;
  margin-top: 3rem;
}

.skills-certs-row {
  display: flex;
  gap: 2rem;
  justify-content: center;
  margin-bottom: 5rem;
  flex-wrap: wrap;
}

.skills-card,
.certs-card {
  flex: 1 1 320px;
  max-width: 420px;
  min-width: 280px;
  background: var(--card-bg);
  border-radius: 1rem;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
  padding: 2rem 1.5rem 2.5rem 1.5rem;
  transition: box-shadow 0.2s, transform 0.2s;
}

.skills-card:hover,
.certs-card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 4px 24px rgba(56,189,248,0.15);
}

.skills-card h2,
.certs-card h2 {
  margin-bottom: 1.5rem;
  text-align: center;
}

.cert-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 1.1rem;
}

.cert-list li {
  background: rgba(56,189,248,0.08);
  color: var(--accent-color);
  margin-bottom: 1rem;
  padding: 0.7rem 1rem;
  border-radius: 0.5rem;
  font-weight: 600;
  text-align: center;
  letter-spacing: 0.5px;
}
body.light-mode .cert-list li {
  color: var(--text-color); /* dark text for visibility */
  background: #e0f5d8; /* optional: softer green background */
}
/* ========== Theme Toggle Switch ========== */
.theme-toggle-wrapper {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-left: 2rem;
  background: var(--card-bg);
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  user-select: none;
}

.theme-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.theme-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  background-color: var(--gray);
  border-radius: 9999px;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  transition: 0.4s;
}

.slider::before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: var(--bg-color);
  transition: 0.4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--accent-color);
}

input:checked + .slider::before {
  transform: translateX(20px);
}

.mode-label {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-color);
}
.social-links {
  text-align: center;
  margin-top: 4rem;
}

.social-links h2 {
  margin-bottom: 1.5rem;
  color: var(--text-color);
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 2rem;
  font-size: 2rem;
}

.social-icons a {
  color: var(--accent-color);
  transition: transform 0.2s, color 0.2s;
}

.social-icons a:hover {
  color: var(--highlight);
  transform: scale(1.2);
}
.blog-controls {
  text-align: center;
  margin: 2rem auto;
}

#blogSearch {
  padding: 0.75rem 1.2rem;
  width: 80%;
  max-width: 500px;
  border-radius: 0.5rem;
  border: none;
  font-size: 1rem;
  background: var(--card-bg);
  color: var(--text-color);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.tag-filter {
  margin-top: 1rem;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  padding: 0.4rem 0.9rem;
  border-radius: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--accent-color);
  background: transparent;
  color: var(--accent-color);
  transition: all 0.2s ease;
}

.tag:hover {
  background: var(--accent-color);
  color: #000;
}

.tag.active {
  background: var(--accent-color);
  color: #000;
  box-shadow: 0 2px 12px rgba(159, 239, 0, 0.2);
}
.blog-posts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 2rem;
}
/* Applies only to blog page */
.blog-post.card a.primarylink {
  display: block;
  width: fit-content;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  margin: 1rem auto 0 auto;
}

/* Applies to projects/home */
.card-buttons a.primarylink,
.card-buttons a.seclink {
  padding: 0.6rem 1.2rem;
  font-size: 0.95rem;
  min-width: 120px;
  text-align: center;
}
body.light-mode .nav-brand {
  color: var(--text-color);
}
.card p {
  text-align: left;
  color: var(--gray);
}



