/* === CSS Variables for Themes === */
:root {
  /* Light theme (default) */
  --bg-color: #ffffff;
  --text-color: #1f2937;
  --heading-color: #111827;
  --link-color: #0ea5e9;
  --link-hover-color: #0369a1;
  --border-color: #e5e7eb;
  --card-bg: #f9fafb;
  --header-bg: rgba(255, 255, 255, 0.95);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  --code-bg: #f3f4f6;
  --skill-bg: #e0f2fe;
  --skill-color: #0369a1;
}

[data-theme="dark"] {
  /* Dark theme */
  --bg-color: #0f172a;
  --text-color: #cbd5e1;
  --heading-color: #f1f5f9;
  --link-color: #60a5fa;
  --link-hover-color: #93c5fd;
  --border-color: #334155;
  --card-bg: #1e293b;
  --header-bg: rgba(15, 23, 42, 0.95);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  --code-bg: #1e293b;
  --skill-bg: #1e3a8a;
  --skill-color: #dbeafe;
}

/* === Apply Variables to Elements === */
body {
  background-color: var(--bg-color);
  color: var(--text-color);
  transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--heading-color);
}

a {
  color: var(--link-color);
}

a:hover {
  color: var(--link-hover-color);
}

/* Update your existing header styles */
header {
  background-color: var(--header-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
}

/* Update project card styles */
.project-item {
  border-left-color: var(--link-color);
  border-bottom-color: var(--border-color);
}

.project-item:hover {
  background-color: var(--card-bg);
}

/* Update skill tags */
.skill-tag {
  background-color: var(--skill-bg);
  color: var(--skill-color);
}

/* === Theme Toggle Button Styles === */
.theme-toggle {
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-left: 10px;
  margin-right: 5px;
  margin-top: 3px;
  margin-bottom: 2px;
}

.theme-toggle:hover {
  background-color: var(--card-bg);
  transform: scale(1.05);
}

.theme-toggle:active {
  transform: scale(0.95);
}

/* Icon visibility */
.moon-icon {
  display: none;
}

.sun-icon {
  display: block;
}

[data-theme="dark"] .moon-icon {
  display: block;
}

[data-theme="dark"] .sun-icon {
  display: none;
}

/* Smooth theme transitions */
.theme-transition-ready *,
.theme-transition-ready *::before,
.theme-transition-ready *::after {
  transition: background-color 0.3s ease,
              color 0.3s ease,
              border-color 0.3s ease,
              box-shadow 0.3s ease;
}

/* Optional: Add a subtle animation for the toggle */
@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.theme-toggle:focus {
  outline: 2px solid var(--link-color);
  outline-offset: 2px;
}

.theme-toggle.clicked {
  animation: pulse 0.3s ease;
}

.project-item {
  border-left: 4px solid #0ea5e9; /* A colored accent bar */
  padding-left: 1.5rem;
  margin-bottom: 3rem; /* Space cards apart */
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #e2e8f0; /* A subtle separator */
}

h2 {
  font-size: 1.8rem; /* Larger than body text */
  font-weight: 700;
  margin-top: 3rem; /* Creates clear sections */
  margin-bottom: 1.5rem;
  color: #1e293b; /* A very dark gray for better contrast */
}

body {
  line-height: 1.6; /* More space between lines of text */
}
p, ul {
  margin-bottom: 1.5rem;
}
/* Add space around the main content */
main {
  max-width: 800px; /* Constrain line length for readability */
  margin: 0 auto; /* Center it */
  padding: 2rem 1.5rem;
}

@media (min-width: 768px) {
  main {
    padding: 3rem 2rem;
  }
  .project-item {
    display: grid; /* Consider a two-column layout for projects on desktop */
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
  }
}

.project-item:hover {
  background-color: #f8fafc; /* A very light gray background on hover */
  transition: background-color 0.3s ease;
}

.skill-tag {
  display: inline-block;
  background-color: #e0f2fe; /* Light blue */
  color: #0369a1; /* Darker blue */
  padding: 0.3rem 0.8rem;
  margin: 0.3rem;
  border-radius: 50px; /* Pill shape */
  font-size: 0.9rem;
}
.skill-tag:hover {
  background-color: #0ea5e9; /* Brand blue */
  color: white;
  transform: translateY(-2px); /* Slight "lift" effect */
  transition: all 0.2s ease;
}

/* Projects Section */
.projects-section {
  margin: 4rem 0;
}

.projects-section h2 {
  font-size: 2rem;
  margin-bottom: 2rem;
  position: relative;
  display: inline-block;
}

.projects-section h2::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 60px;
  height: 4px;
  background-color: var(--link-color);
  border-radius: 2px;
}

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

/* Project Card */
.project-card {
  background-color: var(--card-bg);
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

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

.card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.project-icon {
  font-size: 1.8rem;
  line-height: 1;
}

.project-card h3 {
  margin: 0;
  font-size: 1.3rem;
  color: var(--heading-color);
}

.project-description {
  color: var(--text-color);
  margin-bottom: 1.25rem;
  line-height: 1.5;
  flex-grow: 1;
}

/* Tech Stack Tags */
.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.tech-tag {
  background-color: var(--skill-bg);
  color: var(--skill-color);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.tech-tag:hover {
  opacity: 0.9;
  transform: scale(1.02);
}

/* Card Links */
.card-links {
  display: flex;
  gap: 1.5rem;
  margin-top: auto;
}

.card-link {
  color: var(--link-color);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s ease;
  position: relative;
}

.card-link:hover {
  color: var(--link-hover-color);
}

.card-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: currentColor;
  transition: width 0.2s ease;
}

.card-link:hover::after {
  width: 100%;
}

header {
  position: static;
}

/* === Hero Section (Unique Names) === */
.portfolio-hero {
  padding: 4rem 5rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 3rem;
}

.portfolio-hero-content {
  max-width: 700px;
}

.portfolio-hero-title {
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.portfolio-greeting {
  display: block;
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--text-color);
  opacity: 0.8;
  margin-bottom: 0.25rem;
}

.portfolio-name {
  display: block;
  font-size: 2.5rem;
  font-weight: 500;
  color: var(--heading-color);
  letter-spacing: -0.02em;
}

@media (min-width: 640px) {
  .portfolio-name {
    font-size: 3.5rem;
  }
}

.portfolio-hero-tagline {
  font-size: 1.3rem;
  color: var(--link-color);
  font-weight: 500;
  margin: 1rem 0 0.5rem;
}

.portfolio-hero-summary {
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--text-color);
  max-width: 600px;
  margin: 1.5rem 0 2rem;
}

.portfolio-hero-summary strong {
  color: var(--heading-color);
  font-weight: 600;
}

.portfolio-hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

.portfolio-cta-button {
  display: inline-block;
  padding: 0.75rem 2rem;
  border-radius: 40px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
  border: 2px solid transparent;
}

.portfolio-cta-button.primary {
  background-color: var(--link-color);
  color: white;
}

.portfolio-cta-button.primary:hover {
  background-color: var(--link-hover-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

.portfolio-cta-button.secondary {
  background-color: transparent;
  color: var(--link-color);
  border-color: var(--link-color);
}

.portfolio-cta-button.secondary:hover {
  background-color: var(--link-color);
  color: white;
  transform: translateY(-2px);
}

/* === Skills Section (Unique Names) === */
.portfolio-skills-section {
  margin: 7rem 5rem;
}

.portfolio-skills-section h2 {
  font-size: 2rem;
  margin-bottom: 2.5rem;
  position: relative;
  display: inline-block;
}

.portfolio-skills-section h2::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 60px;
  height: 4px;
  background-color: var(--link-color);
  border-radius: 2px;
}

.portfolio-skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2.5rem;
}

.portfolio-skill-category h3 {
  font-size: 1.2rem;
  color: var(--heading-color);
  margin-bottom: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  opacity: 0.9;
}

.portfolio-skill-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.portfolio-skill-badge {
  background-color: var(--skill-bg);
  color: var(--skill-color);
  padding: 0.4rem 1rem;
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: default;
  border: 1px solid transparent;
}

.portfolio-skill-badge:hover {
  transform: translateY(-2px);
  background-color: var(--link-color);
  color: white;
  border-color: var(--link-color);
}

/* Dark mode adjustment for skill badges (optional – your variables already handle it) */
[data-theme="dark"] .portfolio-skill-badge {
  background-color: #1e3a8a;
  color: #dbeafe;
}

[data-theme="dark"] .portfolio-skill-badge:hover {
  background-color: #3b82f6;
  color: white;
}


/* CSS for writing and speaking */

/* === Insights / Writing & Speaking Section === */
.portfolio-insights {
  margin: 4rem 0;
}

.portfolio-insights h2 {
  font-size: 2rem;
  margin-bottom: 2.5rem;
  position: relative;
  display: inline-block;
}

.portfolio-insights h2::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 60px;
  height: 4px;
  background-color: var(--link-color);
  border-radius: 2px;
}

/* Optional: Subheadings for each content type */
.portfolio-insights h3 {
  font-size: 1.5rem;
  margin: 3rem 0 1.5rem;
  color: var(--heading-color);
}

/* === Testimonials Grid === */
.portfolio-testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.portfolio-testimonial-card {
  background-color: var(--card-bg);
  border-radius: 12px;
  padding: 1.8rem 1.5rem;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.portfolio-testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.testimonial-quote {
  font-size: 1rem;
  line-height: 1.6;
  font-style: italic;
  color: var(--text-color);
  margin-bottom: 1.2rem;
  quotes: "“" "”" "‘" "’";
}

.testimonial-quote::before {
  content: "“";
  font-size: 1.5rem;
  line-height: 0;
  margin-right: 2px;
  color: var(--link-color);
  opacity: 0.5;
}

.testimonial-quote::after {
  content: "”";
  font-size: 1.5rem;
  line-height: 0;
  margin-left: 2px;
  color: var(--link-color);
  opacity: 0.5;
}

.testimonial-author {
  font-weight: 600;
  color: var(--heading-color);
  margin-bottom: 0.25rem;
}

.testimonial-title {
  font-size: 0.9rem;
  color: var(--text-color);
  opacity: 0.8;
}

/* === Blog Posts Grid === */
.portfolio-blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.portfolio-blog-card {
  background-color: var(--card-bg);
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}

.portfolio-blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.portfolio-blog-card h3 {
  font-size: 1.3rem;
  margin: 0 0 0.75rem;
  color: var(--heading-color);
  line-height: 1.4;
}

.portfolio-blog-card p {
  color: var(--text-color);
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

/* === Tech Talks Grid === */
.portfolio-talks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.portfolio-talk-card {
  background-color: var(--card-bg);
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.portfolio-talk-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.portfolio-talk-card h3 {
  font-size: 1.3rem;
  margin: 0 0 0.5rem;
  color: var(--heading-color);
}

.talk-meta {
  font-size: 0.9rem;
  color: var(--link-color);
  margin-bottom: 1rem;
  font-weight: 500;
}

.portfolio-talk-card p {
  color: var(--text-color);
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.talk-links {
  display: flex;
  gap: 1.5rem;
  margin-top: auto;
}

/* === Card Link Style (used across all cards) === */
.portfolio-card-link {
  color: var(--link-color);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.portfolio-card-link:hover {
  color: var(--link-hover-color);
}

.portfolio-card-link::after {
  content: '';
  width: 0;
  height: 2px;
  background-color: currentColor;
  transition: width 0.2s ease;
}

.portfolio-card-link:hover::after {
  width: 100%;
}

/* For arrow or icon, you can keep the → entity in HTML */