:root {
  --color-primary: #2563eb;
  --color-primary-dark: #1d4ed8;
  --color-primary-light: #60a5fa;

  --color-background-body: #f3f4f6;
  --color-background-alt: #f9fafb;
  --color-background-card: #ffffff;

  --color-text-primary: #1f2937;
  --color-text-muted: #4b5563;
  --color-text-inverted: #ffffff;

  --font-heading: 'Poppins', sans-serif;
  --font-body: 'Roboto', sans-serif;
}

html.dark {
  --color-primary: #3b82f6;
  --color-primary-dark: #1e3a8a;
  --color-primary-light: #60a5fa;

  --color-background-body: #111827;
  --color-background-alt: #1f2937;
  --color-background-card: #374151;

  --color-text-primary: #f9fafb;
  --color-text-muted: #9ca3af;
  --color-text-inverted: #1f2937;
}


html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--color-background-body);
  color: var(--color-text-primary); 
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition-property: background-color, color;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 300ms;
  line-height: 1.6; 
}


html.dark body {
  background-color: var(--color-background-body); 
  color: var(--color-text-primary); 
}


a {
  color: #2563eb; 
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
html.dark a {
  color: #60a5fa; 
}


h1, h2, h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-weight: 600;
  line-height: 1.3;
  font-family: var(--font-heading);
}
h1 { font-size: 2.25rem;}
h2 { font-size: 1.875rem;margin-bottom: 1.5rem; } 
h3 { font-size: 1.25rem;}


section {
  padding: 4rem 1.5rem; 
}
@media (min-width: 768px) {
  section {
    padding: 5rem 2.5rem;
  }
}


header {
  padding: 1rem 1.5rem; 
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--color-primary-dark);
  color: var(--color-text-inverted);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); 
  position: sticky;
  top: 0;
  z-index: 50; 
  width: 100%;
  box-sizing: border-box;
}
html.dark header {
  background-color: #1e3a8a; 
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-mask { 
  display: inline-block;
  width: 50px; 
  height: 50px;
  background-color: currentColor;
  vertical-align: middle;
  -webkit-mask-image: url('mylogo.svg');
  mask-image: url('mylogo.svg');
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}

header h1 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  color: #ffffff; 
}

header nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

header nav a {
  color: #ffffff;
  text-decoration: none;
  padding: 0.25rem 0;
  font-size: 0.95rem;
  transition: opacity 0.2s ease-in-out;
}
header nav a:hover {
  text-decoration: underline;
  opacity: 0.8;
}

.icon-moon {
  display: block;
}
.icon-sun {
  display: none;
}

/* When dark mode is active, swap the icons */
html.dark .icon-moon {
  display: none;
}
html.dark .icon-sun {
  display: block;
}


#darkModeToggle {
  background-color: transparent; /* Make background match header */
  color: #ffffff; /* White icon */
  border: none;
  border-radius: 50%; /* Make it circular */
  cursor: pointer;
  font-size: 1.5rem; /* Adjust icon size */
  width: 44px;  /* Set a fixed size */
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease-in-out;
}

#darkModeToggle:hover {
  background-color: rgba(255, 255, 255, 0.15); /* Subtle hover effect */
}


#hero {
  background-color: #e0e7ff; 
  color: #1e3a8a; 
  padding-top: 5rem; 
  padding-bottom: 5rem;
}
html.dark #hero {
  background-color: #1e3a8a;
  color: #e0e7ff; 
}

.hero-content-wrapper {
  display: flex;
  flex-direction: row; 
  align-items: center; 
  justify-content: center; 
  gap: 3rem;             
  max-width: 1100px;     
  margin: 0 auto;        
  padding: 0 1.5rem;     
}

.hero-image-container {
  flex-shrink: 0; 
}

#hero h2 {
  font-size: 2.5rem; 
  font-weight: 700;
  margin-bottom: 0.5rem;
}
#hero .tagline {
  font-size: 1.25rem;
  font-weight: 400;
  color: #374151; 
  margin-bottom: 1rem;
}
html.dark #hero .tagline {
  color: #a5b4fc; 
}
#hero .intro {
  max-width: 600px;
  margin: 0 auto 2rem auto;
  font-size: 1.1rem;
  line-height: 1.7;
}
#hero .hero-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.profile-picture {
  display: block;
  width: 200px;   
  height: 200px;  
  border-radius: 50%; 
  object-fit: cover; 
  border: 4px solid #ffffff; 
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); 
}
html.dark .profile-picture {
    border-color: #4a5568; 
}

.hero-text-container {
  text-align: left; 
}

@media (max-width: 768px) { 
  .hero-content-wrapper {
    flex-direction: column; 
    text-align: center;     
    gap: 2rem;              
  }
}

.hero-text-container {
  text-align: center;   
}

.cta-button {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background-color: var(--color-primary);
  color: #ffffff;
  border-radius: 0.375rem;
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.2s ease-in-out, transform 0.1s ease;
  border: 1px solid transparent;
  margin: 0.25rem;
}

.cta-button:hover {
  background-color: #1d4ed8; 
  text-decoration: none;
  transform: translateY(-1px);
}

html.dark .cta-button {
  background-color: #3b82f6;
  color: #ffffff;
}
html.dark .cta-button:hover {
  background-color: #60a5fa;
}


#experience {
  background-color: #f9fafb;
}
html.dark #experience {
  background-color: #1f2937;
}
#experience h2 {
  text-align: center;
}
.experience-item {
  max-width: 700px;
  margin: 0 auto 2.5rem auto;
  padding: 1.5rem;
  background-color: #ffffff; 
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}
html.dark .experience-item {
  background-color: #374151; 
  box-shadow: none;
}
.experience-item h3 {
  margin-bottom: 0.25rem;
}
.experience-item .company-location {
  font-style: italic;
  color: #6b7280; 
  margin-bottom: 0.25rem;
}
html.dark .experience-item .company-location {
  color: #9ca3af;
}
.experience-item .dates {
  font-size: 0.9rem;
  color: #6b7280; 
  margin-bottom: 1rem;
}
html.dark .experience-item .dates {
  color: #9ca3af;
}
.experience-item ul {
  list-style: disc;
  padding-left: 1.25rem;
  margin: 0;
}
.experience-item li {
  margin-bottom: 0.5rem;
}


#about {
  display: flex;
  justify-content: center;
}

#about .content-card {
  background-color: #ffffff;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  border-radius: 0.5rem;
  padding: 2rem;
  max-width: 48rem;
  width: 100%;
  box-sizing: border-box;
}
html.dark #about .content-card {
  background-color: #1f2937; 
}
#about .content-card h2 {
  font-size: 1.875rem;
  font-weight: 600;
  color: #2563eb;
  text-align: center;
  margin-bottom: 1rem;
}
html.dark #about .content-card h2 {
  color: #60a5fa;
}
#about .content-card p {
  color: #1f2937;
  line-height: 1.625;
  margin: 0;
}
#about .content-card p + p {
  margin-top: 1rem;
}
html.dark #about .content-card p {
  color: #d1d5db;
}
#about .content-card strong {
  font-weight: 700;
}


#skills {
  background-color: #f9fafb; 
}
html.dark #skills {
  background-color: #1f2937; 
}
#skills h2 {
  text-align: center;
}
.skills-grid {
  display: grid;
  gap: 1.5rem;
  max-width: 1000px;
  margin: 0 auto; 
}

@media (min-width: 640px) { 
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1024px) { 
  .skills-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.skill-category {
  background-color: #ffffff;
  padding: 1.5rem;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}
html.dark .skill-category {
  background-color: #374151;
  box-shadow: none;
}
.skill-category h3 {
  margin-bottom: 1rem;
  border-bottom: 2px solid #60a5fa; 
  padding-bottom: 0.5rem;
}
html.dark .skill-category h3 {
  border-bottom-color: #3b82f6;
}
.skill-category ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.skill-category li {
  margin-bottom: 0.5rem;
  padding-left: 1rem;
  position: relative;
}

.skill-category li::before {
  content: '▹'; 
  position: absolute;
  left: 0;
  color: #2563eb; 
}
html.dark .skill-category li::before {
  color: #60a5fa;
}


#projects h2 {
  text-align: center;
}
.project-grid {
  display: grid;
  gap: 1.5rem;
  margin-top: 2rem;
  max-width: 1100px; 
  margin-left: auto;
  margin-right: auto; 
}
@media (min-width: 768px) {
  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.project-card {
  background-color: var(--color-background-card);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  border-radius: 0.5rem;
  overflow: hidden;
  display: flex; 
  flex-direction: column;

  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

html.dark .project-card {
  background-color: #374151; 
}

.project-card:hover {
  transform: translateY(-5px); /* Lifts the card up by 5px */
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); /* Increases the shadow */
}

html.dark .project-card {
  background-color: var(--color-background-card); /* Should now use variable */
}

.project-card img {
  width: 100%;
  height: 12rem;
  object-fit: cover;
  display: block;
}
.project-card .card-content {
  padding: 1.5rem;
  flex-grow: 1; 
  display: flex;
  flex-direction: column;
}
.project-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 0.5rem 0;
}
html.dark .project-card h3 {
  color: #ffffff;
}
.project-card p {
  margin-top: 0;
  margin-bottom: 0.75rem; 
  color: #374151;
  font-size: 1rem; 
  line-height: 1.6;
  flex-grow: 1; 
}
html.dark .project-card p {
  color: #d1d5db;
}
.project-card p strong { 
    font-weight: 600;
}
.project-links {
    margin-top: 1rem;
    display: flex;
    gap: 1rem;
}
.project-links a {
    font-size: 0.9rem;
}



#courses {
  padding: 4rem 1.5rem;
  background-color: #2563eb;
  color: #ffffff;
}
html.dark #courses {
  background-color: #374151; 
  color: #d1d5db;
}
#courses h2 {
  text-align: center;
  color: #ffffff;
}
html.dark #courses h2 {
   color: #e5e7eb; 
}
#courses ul {
  list-style: none;
  padding: 0;
  margin: 1rem auto 0 auto;
  max-width: 800px;
}

#courses .status {
  display: inline-block; 
  padding: 0.2em 0.6em;   
  margin-left: 0.5em;    
  font-size: 0.8rem;      
  font-weight: 600;    
  line-height: 1;         
  text-align: center;
  white-space: nowrap;
  vertical-align: baseline;
  border-radius: 0.375rem; 
  color: #ffffff;        
}

#courses .status-completed {
  background-color: #4CAF50;
}

#courses .status-in-progress {
  background-color: #FF9800; 
}

#courses li {
  margin-bottom: 0.75rem;
  padding: 0.75rem 1rem; 
  border-left: 4px solid #1d4ed8;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 0 4px 4px 0;
}
html.dark #courses li {
  border-left-color: #a5b4fc; 
  background-color: rgba(0, 0, 0, 0.2);
}
#courses li strong {
  font-weight: 600;
}
#courses li em {
  font-style: italic;
  opacity: 0.9;
  font-size: 0.9em;
  margin-left: 0.25rem;
}
#courses li a { 
  color: inherit; 
  text-decoration: underline;
  opacity: 0.85;
  font-size: 0.85em;
  margin-left: 0.25rem;
}
#courses li a:hover {
  opacity: 1;
  text-decoration: none;
}

#contact {
  background-color: #f9fafb; 
  text-align: center;
}
html.dark #contact {
  background-color: #1f2937; 
}

#contact p {
  max-width: 550px;
  margin: 0 auto 2rem auto; 
}
.contact-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}




footer {
  padding: 2rem 1.5rem;
  text-align: center;
  background-color: #1d4ed8;
  color: #ffffff;
}
html.dark footer {
  background-color: #1e3a8a;
}
footer p {
    margin: 0 0 0.75rem 0; 
    font-size: 0.9rem;
}
footer .social-links {
  display: flex;
  justify-content: center;
  gap: 1.75rem;
}
footer .social-links a {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.2s ease-in-out, transform 0.2s ease;
  font-size: 1.75rem;
  display: inline-block;
}
footer .social-links a:hover {
  opacity: 0.8;
  transform: scale(1.1);
}


#pitch {
  background-color: #f9fafb;
  text-align: center;
   padding: 4rem 1.5rem;
}
html.dark #pitch {
  background-color: #1f2937;
}

#pitch h2 {
  margin-bottom: 1rem; 
}

#pitch p {
    max-width: 600px;
    margin: 0 auto 2rem auto; 
    color: #4b5563; 
}
html.dark #pitch p {
    color: #9ca3af;
}


.video-container {
  position: relative;
  padding-bottom: 56.25%; 
  height: 0;
  overflow: hidden;
  max-width: 800px; 
  margin: 0 auto; 
  background-color: #000; 
  border-radius: 8px; 
  box-shadow: 0 4px 15px rgba(0,0,0,0.1); 
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0; 
}


/* --- Mobile Navigation Toggle Button --- */
.mobile-nav-toggle {
  display: none; /* Hidden by default on desktop */
  background: none;
  border: none;
  padding: 0.5rem;
  margin-left: 1rem; /* Add space next to dark mode toggle if needed */
  color: #ffffff; /* White icon to match header text */
  font-size: 1.75rem; /* Make icon larger */
  cursor: pointer;
  z-index: 100; /* Ensure it's clickable above nav panel if it opens */
}

/* --- Default Navigation Styles (Mobile First Approach) --- */
header nav {
  /* Mobile base styles: Hidden initially, styled as overlay when active */
  display: none; /* Hidden by default on mobile */
  flex-direction: column; /* Stack links vertically when shown */
  align-items: center; /* Center links horizontally */
  gap: 1rem; /* Spacing between vertical links */

  /* Positioning & Appearance for when JS opens it */
  position: absolute;
  top: 100%; /* Position below the header */
  /* Or use fixed height: top: 60px; Adjust based on your header height */
  left: 0;
  width: 100%;
  background-color: #1d4ed8; /* Same as light mode header bg */
  padding: 1.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
  z-index: 99; /* Below the toggle button */
}
html.dark header nav {
    background-color: #1e3a8a; /* Same as dark mode header bg */
}

/* Style links when mobile nav is open */
header nav a {
    color: #ffffff;
    text-decoration: none;
    font-size: 1.1rem; /* Make mobile links slightly larger */
    padding: 0.5rem 1rem;
    width: 100%; /* Make tap area wider */
    text-align: center;
    border-radius: 4px;
}
header nav a:hover {
    background-color: rgba(255, 255, 255, 0.1); /* Subtle hover */
    text-decoration: none;
}

/* --- Class to Show Mobile Nav (Toggled by JavaScript) --- */
/* Add this class to <nav> via JS to show it */
header nav.mobile-nav-open {
  display: flex; /* Show the navigation */
}


/* --- Desktop Navigation Styles --- */
@media (min-width: 768px) { /* Adjust this breakpoint as needed */

  /* Hide hamburger button on desktop */
  .mobile-nav-toggle {
    display: none;
  }

  /* Show and style nav for desktop */
  header nav {
    display: flex; /* Show the nav */
    flex-direction: row; /* Horizontal layout */
    position: static; /* Reset mobile positioning */
    width: auto;      /* Reset mobile width */
    background-color: transparent; /* Reset mobile background */
    padding: 0;       /* Reset mobile padding */
    box-shadow: none; /* Reset mobile shadow */
    /* Keep gap for horizontal spacing */
    gap: 1.25rem;
  }

  /* Reset link styles for desktop */
  header nav a {
    font-size: 0.95rem; /* Restore desktop font size */
    padding: 0.25rem 0; /* Restore desktop padding */
    width: auto;      /* Reset mobile width */
    text-align: left;
    background-color: transparent; /* Ensure no hover background persists */
  }
  header nav a:hover {
    background-color: transparent; /* Ensure no hover background persists */
    text-decoration: underline; /* Restore underline hover */
    opacity: 0.8;
  }
}

/* --- Certificate Modal Styles --- */
.view-cert-btn {
  background-color: #4A5568; /* A neutral dark gray */
  color: white;
  border: none;
  padding: 0.2rem 0.6rem;
  font-size: 0.75rem;
  border-radius: 4px;
  cursor: pointer;
  margin-left: 0.5rem;
  vertical-align: baseline;
  transition: background-color 0.2s ease;
}
.view-cert-btn:hover {
  background-color: #2D3748;
}
html.dark .view-cert-btn {
  background-color: #A0AEC0; /* A neutral light gray */
  color: #1A202C;
}
html.dark .view-cert-btn:hover {
  background-color: #CBD5E0;
}

.modal {
  display: none; /* Hidden by default */
  position: fixed; /* Stay in place */
  z-index: 1000; /* Sit on top of everything */
  padding-top: 50px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto; /* Enable scroll if image is too tall */
  background-color: rgba(0,0,0,0.85); /* Black overlay with opacity */
  -webkit-backdrop-filter: blur(5px); /* Optional: blur background */
  backdrop-filter: blur(5px);
}

.modal-content {
  margin: auto;
  display: block;
  width: 90%;
  max-width: 800px;
  border-radius: 4px; /* Optional rounded corners for the image */
}

.close-btn {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
}
.close-btn:hover,
.close-btn:focus {
  color: #bbb;
  text-decoration: none;
  cursor: pointer;
}


/* --- Scroll Animation Styles --- */
.fade-in-section {
  opacity: 0;
  transform: translateY(20px); /* Start 20px lower */
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* This class will be added by JS when the element is visible */
.fade-in-section.is-visible {
  opacity: 1;
  transform: translateY(0);
}