:root {
  /* Light mode colors */
  --color-primary: #007bff;
  --color-primary-dark: #0056b3;
  --color-text: #495057;
  --color-text-light: #6c757d;
  --color-heading: #212529;
  --color-background: #fff;
  --color-background-alt: #f8f9fa;
  --color-border: #dee2e6;
  --color-shadow: rgba(0, 0, 0, 0.05);
  --color-shadow-darker: rgba(0, 0, 0, 0.1);
}

/* Dark mode colors */
[data-theme="dark"] {
  --color-primary: #3b8aff;
  --color-primary-dark: #1a6dff;
  --color-text: #e1e1e1;
  --color-text-light: #a0a0a0;
  --color-heading: #ffffff;
  --color-background: #1a1a1a;
  --color-background-alt: #2a2a2a;
  --color-border: #404040;
  --color-shadow: rgba(0, 0, 0, 0.2);
  --color-shadow-darker: rgba(0, 0, 0, 0.3);
}

/* Global Reset and Typography */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 70px;
}

body {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-background);
}

/* Container */
.container {
  width: 90%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  margin-bottom: 1rem;
  line-height: 1.2;
  color: var(--color-heading);
}

h1 {
  font-size: 3rem;
  font-weight: 700;
}

h2 {
  font-size: 2.2rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

p {
  margin-bottom: 1.2rem;
  color: var(--color-text);
}

/* Heading anchor links styling - Global */
h2 a,
h3 a,
h4 a {
  color: inherit;
  text-decoration: none;
  position: relative;
}

h2 a:hover,
h3 a:hover,
h4 a:hover {
  color: var(--color-primary);
}

h2 a::before,
h3 a::before,
h4 a::before {
  content: '#';
  position: absolute;
  left: -1.5rem;
  color: var(--color-text-light);
  opacity: 0;
  transition: opacity 0.2s ease;
  font-weight: normal;
}

h2:hover a::before,
h3:hover a::before,
h4:hover a::before {
  opacity: 1;
}

/* Ensure headings have relative positioning */
h2, h3, h4 {
  position: relative;
}

/* Navigation */
nav {
  background-color: var(--color-background);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 4px var(--color-shadow);
}

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

.site-title {
  font-size: 1.5rem;
  font-weight: 600;
}

nav .site-title a {
  color: var(--color-heading);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

.nav-menu {
  display: flex;
  gap: 2rem;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

nav ul li a {
  color: var(--color-text);
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  transition: color 0.3s ease;
  padding: 0.5rem 0;
  position: relative;
}

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

nav ul li a:hover {
  color: var(--color-primary);
}

nav ul li a:hover::after {
  width: 100%;
}

/* Mobile menu toggle */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--color-text);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  transition: color 0.3s ease;
}

.mobile-menu-toggle:hover {
  color: var(--color-primary);
}

.mobile-menu-toggle.active {
  color: var(--color-primary);
}

@media screen and (max-width: 768px) {
  nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
  }

  .mobile-menu-toggle {
    display: block;
    z-index: 102;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--color-background);
    padding: 5rem 1.5rem 2rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    transform: translateX(100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 101;
    overflow-y: auto;
  }

  .nav-menu.active {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-menu li {
    width: 100%;
  }

  .nav-menu li a {
    display: block;
    padding: 1rem;
    text-align: left;
    font-size: 1.1rem;
    border-radius: 4px;
  }

  .nav-menu li a:hover {
    background-color: var(--color-background-alt);
  }

  .theme-toggle {
    margin: 1rem 0;
    align-self: flex-start;
    width: 100%;
    justify-content: flex-start;
    font-size: 1.1rem;
    padding: 1rem;
    background: none;
    border-radius: 4px;
  }

  .theme-toggle:hover {
    background-color: var(--color-background-alt);
    transform: none;
    box-shadow: none;
  }
}

@media screen and (max-width: 768px) {
  nav .container {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem 0;
  }

  nav ul {
    gap: 1.5rem;
    justify-content: center;
  }

  nav ul li a {
    font-size: 0.9rem;
  }
}

@media screen and (max-width: 768px) {
  .container {
    max-width: 95%;
    padding: 0 15px;
  }

  nav .container {
    flex-direction: column;
    gap: 1rem;
  }

  nav ul {
    gap: 1.5rem;
    justify-content: center;
  }

  #about, #approach, #blog {
    padding: 3rem 0;
  }

  section h2 {
    margin-bottom: 2rem;
  }

  footer {
    padding: 2.5rem 0;
  }
}

@media screen and (max-width: 480px) {
  .container {
    padding: 0 12px;
  }

  .about-wrapper {
    gap: 2rem;
  }

  .about-content h1 {
    font-size: 2rem;
  }

  .about-content .tagline {
    font-size: 1.2rem;
    margin-bottom: 1.25rem;
  }

  .about-content p {
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1.25rem;
  }

  nav ul {
    gap: 1rem;
  }

  #about, #approach, #blog {
    padding: 2.5rem 0;
  }

  section h2 {
    margin-bottom: 1.5rem;
  }

  footer {
    padding: 2rem 0;
  }
}

/* Theme toggle button */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--color-background-alt);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  padding: 0.5rem;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.theme-toggle i {
  font-size: 1.1rem;
}

.theme-toggle span {
  display: none;
}

.theme-toggle:hover {
  color: var(--color-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px var(--color-shadow);
}

@media screen and (max-width: 768px) {
  .theme-toggle-wrapper {
    width: 100%;
  }

  .theme-toggle {
    width: 100%;
    padding: 1rem;
    justify-content: flex-start;
    background: none;
    border: none;
    border-radius: 4px;
    color: var(--color-text);
    font-size: 1rem;
    font-weight: 500;
  }

  .theme-toggle span {
    display: inline;
  }

  .theme-toggle:hover {
    background-color: var(--color-background-alt);
    transform: none;
    box-shadow: none;
  }
}

/* About Section */
#about {
  padding: 4rem 0;
  background-color: var(--color-background);
  position: relative;
}

#about::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  pointer-events: none;
}

.about-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 4rem;
}

.about-content {
  flex: 1;
}

.about-content h1 {
  margin-bottom: 0.5rem;
  color: var(--color-heading);
}

.about-content .tagline {
  font-size: 1.5rem;
  color: var(--color-primary);
  margin-bottom: 2rem;
  font-weight: 300;
}

.about-content p {
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
  color: var(--color-text);
}

.about-content p:last-child {
  margin-bottom: 0;
}

.about-content a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.about-content a:hover {
  color: var(--color-primary-dark);
  text-decoration: underline;
}

.about-image {
  flex: 0 0 400px;
  display: flex;
  align-items: center;
}

.about-image img {
  width: 100%;
  max-width: 400px;
  aspect-ratio: 1/1;
  border-radius: 10px;
  box-shadow: 0 4px 8px var(--color-shadow);
}

/* Approach Section */
#approach {
  padding: 4rem 0;
  background-color: var(--color-background-alt);
  position: relative;
}

#approach::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  pointer-events: none;
}

#approach p {
  font-size: 1.1rem;
  color: var(--color-text);
  margin-top: 15px;
  margin-bottom: 15px;
  line-height: 1.8;
}

#approach ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 20px;
  align-items: start;
}

#approach ul li {
  background-color: var(--color-background-alt);
  padding: 15px 20px;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  font-size: 1rem;
  color: var(--color-text);
  min-width: 100%;
  text-align: start;
  box-shadow: 0 1px 3px var(--color-shadow);
}

#approach ul li p {
  margin-top: 10px;
}

/* Insights Section */
#blog {
  padding: 4rem 0;
  background-color: var(--color-background);
  position: relative;
}

#blog::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  pointer-events: none;
}

.insights-intro {
  max-width: 800px;
  margin: 0 auto 3rem;
  text-align: center;
}

.approach {
  width: 100%;
  margin-bottom: 3rem;
  padding: 2.5rem;
  background-color: var(--color-background-alt);
  border-radius: 12px;
  border: 1px solid var(--color-border);
  box-shadow: 0 1px 3px var(--color-shadow);
}

.approach h3 {
  margin-top: 0;
  margin-bottom: 1.5rem;
  color: var(--color-heading);
}

.approach p {
  margin-bottom: 1.5rem;
  color: var(--color-text);
  line-height: 1.8;
}

.approach ol {
  padding-left: 1.5rem;
  margin: 1.5rem 0;
  color: var(--color-text);
}

.approach ol li {
  margin-bottom: 1rem;
  padding-left: 0.5rem;
}

.approach ol li:last-child {
  margin-bottom: 0;
}

.approach strong {
  color: var(--color-primary);
}

/* Section Headings */
section h2 {
  text-align: center;
  margin-bottom: 3rem;
  color: var(--color-heading);
  position: relative;
}

section h2:after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background-color: var(--color-primary);
  margin: 1rem auto 0;
  border-radius: 2px;
}

/* Responsive Design */
@media screen and (max-width: 1200px) {
  .container {
    max-width: 95%;
  }
  
  h1 {
    font-size: 2.75rem;
  }
}

@media screen and (max-width: 1024px) {
  .about-wrapper {
    flex-direction: column-reverse;
    gap: 3rem;
    align-items: center;
  }

  .about-image {
    flex: 0 0 auto;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
  }

  .about-content {
    text-align: center;
  }

  .about-image img {
    max-width: 100%;
  }
}

@media screen and (max-width: 768px) {
  .container {
    max-width: 95%;
    padding: 0 15px;
  }

  nav .container {
    flex-direction: row;
    gap: 1rem;
  }

  nav ul {
    gap: 1.5rem;
    justify-content: center;
  }

  #about, #approach, #blog {
    padding: 3rem 0;
  }

  section h2 {
    margin-bottom: 2rem;
  }

  footer {
    padding: 2.5rem 0;
  }
}

@media screen and (max-width: 480px) {
  .container {
    padding: 0 12px;
  }

  .about-wrapper {
    gap: 2rem;
  }

  .about-content h1 {
    font-size: 2rem;
  }

  .about-content .tagline {
    font-size: 1.2rem;
    margin-bottom: 1.25rem;
  }

  .about-content p {
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1.25rem;
  }

  nav ul {
    gap: 1rem;
  }

  #about, #approach, #blog {
    padding: 2.5rem 0;
  }

  section h2 {
    margin-bottom: 1.5rem;
  }

  footer {
    padding: 2rem 0;
  }
}

/* Blog Posts Grid */
.blog-posts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}

.blog-post {
  background-color: var(--color-background-alt);
  border-radius: 8px;
  padding: 2rem;
  height: 100%;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-post:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px var(--color-shadow-darker);
}

.blog-post h3 {
  color: var(--color-heading);
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.blog-post ul {
  list-style: none;
  margin-left: 0;
}

.blog-post ul li {
  margin-bottom: 0.75rem;
  color: var(--color-text);
}

.blog-post ul li:last-child {
  margin-bottom: 0;
}

/* Read More Button */
.read-more-container {
  display: flex;
  justify-content: center;
  margin-top: 3rem;
}

.read-more-button {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.75rem;
  background-color: var(--color-background-alt);
  color: var(--color-text);
  text-decoration: none;
  border-radius: 50px;
  font-weight: 500;
  border: 1px solid var(--color-border);
  transition: all 0.3s ease;
}

.read-more-button:hover {
  color: var(--color-primary);
  background-color: var(--color-background);
  border-color: var(--color-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px var(--color-shadow);
}

.read-more-button i {
  transition: transform 0.3s ease;
}

.read-more-button:hover i {
  transform: translateX(4px);
}

@media screen and (max-width: 768px) {
  .read-more-button {
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
  }
}

/* Skills Grid */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

.skill-item {
  background-color: var(--color-background);
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.skill-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px var(--color-shadow);
}

/* Focus Areas Section */
#focus-areas {
  background-color: var(--color-background);
  padding: 5rem 0;
}

.focus-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 3rem;
  margin-bottom: 3rem;
}

.focus-item {
  background-color: var(--color-background-alt);
  padding: 2rem;
  border-radius: 8px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.focus-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px var(--color-shadow-darker);
}

.focus-item h3 {
  color: var(--color-heading);
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.focus-item p {
  color: var(--color-text);
  line-height: 1.6;
  margin-bottom: 0;
}

@media screen and (max-width: 768px) {
  #focus-areas {
    padding: 3rem 0;
  }

  .focus-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
  }

  .focus-item {
    padding: 1.5rem;
  }
}

@media screen and (max-width: 480px) {
  #focus-areas {
    padding: 2rem 0;
  }

  .focus-grid {
    gap: 1rem;
    margin-top: 1.5rem;
  }

  .focus-item {
    padding: 1.25rem;
  }

  .focus-item h3 {
    font-size: 1.2rem;
  }
}

/* Skills Section */
#skills {
  padding: 2rem 0;
  background-color: var(--color-background-alt);
  border-top: 1px solid var(--color-border);
}

.skills-container {
  margin: 0;
  width: 100%;
  overflow: hidden;
  position: relative;
}

.skills-container::before,
.skills-container::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50px;
  z-index: 1;
  pointer-events: none;
}

.skills-container::before {
  left: 0;
  background: linear-gradient(to right, var(--color-background-alt), transparent);
}

.skills-container::after {
  right: 0;
  background: linear-gradient(to left, var(--color-background-alt), transparent);
}

.skills-scroll {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding: 0.5rem;
  scrollbar-width: none;  /* Firefox */
  -ms-overflow-style: none;  /* IE and Edge */
  scroll-behavior: smooth;
}

.skills-scroll::-webkit-scrollbar {
  display: none;  /* Chrome, Safari, Opera */
}

.skill-tag {
  background-color: var(--color-background);
  color: var(--color-text);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  white-space: nowrap;
  border: 1px solid var(--color-border);
  transition: all 0.2s ease;
}

.skill-tag:hover {
  background-color: var(--color-primary);
  color: var(--color-background);
  border-color: var(--color-primary);
}

@media screen and (max-width: 768px) {
  #skills {
    padding: 1.5rem 0;
  }

  .skill-tag {
    font-size: 0.85rem;
    padding: 0.4rem 0.8rem;
  }
}

@media screen and (max-width: 480px) {
  #skills {
    padding: 1rem 0;
  }

  .skills-scroll {
    gap: 0.75rem;
  }

  .skill-tag {
    font-size: 0.8rem;
    padding: 0.35rem 0.7rem;
  }
}

/* Footer */
footer {
  background-color: var(--color-background-alt);
  padding: 3rem 0;
  margin-top: 0;
  border-top: 1px solid var(--color-border);
}

.footer-content {
  margin-bottom: 2rem;
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.social-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  padding: 0.75rem 1.25rem;
  background-color: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  color: var(--color-text);
  transition: all 0.2s ease;
}

.social-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px var(--color-shadow);
  color: var(--color-primary);
  text-decoration: none;
}

.social-button i {
  font-size: 1.1rem;
}

.copyright {
  text-align: center;
  color: var(--color-text-light);
  font-size: 0.9rem;
  margin: 0;
}

@media screen and (max-width: 768px) {
  .social-icons {
    gap: 1rem;
  }

  .social-button {
    padding: 0.625rem 1rem;
    font-size: 0.9rem;
  }
}

@media screen and (max-width: 480px) {
  footer {
    padding: 2rem 0;
    margin-top: 0;
  }

  .social-icons {
    gap: 0.75rem;
  }

  .social-button {
    padding: 0.5rem 0.9rem;
    font-size: 0.85rem;
  }
}

/* Transforming Ideas & Focus Areas Section */
#approach {
  background-color: var(--color-background-alt);
  text-align: start;
}

#approach p {
  font-size: 1.1rem;
  color: var(--color-text);
  margin-top: 15px;
  margin-bottom: 15px;
  line-height: 1.8;
}

#approach ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 20px;
  align-items: start;
}

#approach ul li {
  background-color: var(--color-background-alt);
  padding: 15px 20px;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  font-size: 1rem;
  color: var(--color-text);
  min-width: 100%;
  text-align: start;
  box-shadow: 0 1px 3px var(--color-shadow);
}

#approach ul li p {
  margin-top: 10px;
}

@media screen and (max-width: 768px) {
  .blog-posts-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
  }

  .blog-post {
    padding: 1.5rem;
  }

  .insights-intro,
  .approach {
    margin-bottom: 2rem;
  }

  .approach {
    padding: 1.5rem;
  }
}

@media screen and (max-width: 480px) {
  .blog-posts-grid {
    gap: 1rem;
    margin-top: 1.5rem;
  }

  .blog-post {
    padding: 1.25rem;
  }

  .insights-intro,
  .approach {
    margin-bottom: 1.5rem;
  }

  .approach {
    padding: 1.25rem;
  }
}

/* Coming Soon Section */
.coming-soon {
  text-align: center;
  padding: 3rem 2rem;
  background: var(--color-background-alt);
  border-radius: 8px;
  margin: 2rem auto;
  max-width: 600px;
}

.coming-soon h3 {
  color: var(--color-primary);
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.coming-soon p {
  color: var(--color-text);
  font-size: 1.1rem;
  line-height: 1.6;
}

@media screen and (max-width: 768px) {
  .coming-soon {
    padding: 2rem 1rem;
    margin: 1rem auto;
  }
}

/* Homepage Blog Posts Styles */
.blog-post h3 a {
  color: var(--color-heading);
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.3;
}

.blog-post h3 a:hover {
  color: var(--color-primary);
}

.post-meta-home {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-text-light);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.post-excerpt {
  color: var(--color-text);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

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

.read-post-link:hover {
  color: var(--color-primary-dark);
  text-decoration: underline;
}

@media screen and (max-width: 768px) {
  .post-meta-home {
    font-size: 0.85rem;
  }
  
  .blog-post h3 a {
    font-size: 1.3rem;
  }
}