/* =================================
   VARIABLES & CONFIGURATION
   ================================= */
:root {
  /* -- theme colors -- */
  --banner-bg: #f8f9fa;
  --particle-color: #D264B6; /* particle color (dot) */
  --particle-glow-color: #D264B6; /* color for particle-line */
  --accent-color: #60a5fa; /* color for randomly selected particles */
  --text-color-banner: #1f2937; /* text specifically on the banner */
  --page-bg: #ffffff;
  --text-color-page: #1f2937; /* default text color for the page */
  --nav-bg: #ffffff; /* navbar background */
  --nav-text: #374151;
  --nav-hover-text: #1f2937;
  --nav-border-bottom: #e5e7eb;


  /* -- project card colors -- */
  --card-bg: #ffffff;
  --card-border: #e5e7eb; /* light gray border */
  --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --card-hover-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --card-text-color: #374151; /* card body */
  --tech-tag-bg: #e5e7eb;
  --tech-tag-text: #4b5563;
  --button-bg: #60a5fa;
  --button-text: #ffffff;
  --button-hover-bg: #2563eb;
  --button-outline-border: #6b7280;
  --button-outline-text: #4b5563;
  --button-outline-hover-bg: #f3f4f6;
  --button-outline-hover-text: #1f2937;

  /* -- component & animation configuration -- */
  --particle-size: 3px; /* overridden by js parameter*/
  --particle-base-opacity: 0.5;
  --particle-glow-opacity: 0.8; /* max opacity for glowing particles/lines near cursor */
  --transition-speed: 0.3s; /* for non-transform properties like color, opacity */
  --hover-transition-speed: 0.3s; /* specific for hover effects */
  --particle-line-thickness: 1px;
  --card-border-radius: 8px; /* added for consistency */
}

/* defines the variable overrides for dark mode */
body.dark-mode {
  --banner-bg: #111827;
  --text-color-banner: #f3f4f6;
  --page-bg: #111827;
  --text-color-page: #f3f4f6;
  --nav-bg: #1f2937;
  --nav-text: #d1d5db;
  --nav-hover-text: #ffffff;
  --nav-border-bottom: #374151;

  /* project card (dark-mode) */
  --card-bg: #374151;
  --card-border: #4b5563;
  --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.2);
  --card-hover-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.3);
  --card-text-color: #d1d5db;
  --tech-tag-bg: #4b5563;
  --tech-tag-text: #f3f4f6;
  --button-bg: #60a5fa;
  --button-text: #111827;
  --button-hover-bg: #3b82f6;
  --button-outline-border: #9ca3af;
  --button-outline-text: #d1d5db;
  --button-outline-hover-bg: #4b5563;
  --button-outline-hover-text: #f9fafb;
}


/* =================================
   BASE & GLOBAL STYLES
   ================================= */
html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  background-color: var(--page-bg);
  color: var(--text-color-page);
  transition: background-color var(--transition-speed) ease,
  color var(--transition-speed) ease;
  line-height: 1.6;
}

.section-container {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 20px;
}

h2 {
  text-align: center;
  margin-top: 0;
  margin-bottom: 40px;
  padding-top: 60px;
  font-size: 2em;
  color: var(--text-color-page);
  font-weight: 600;
}


/* =================================
   INTERACTIVE BANNER - FULL SCREEN
   ================================= */
#interactive-banner {
  position: relative;
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--banner-bg);
  overflow: hidden;
  transition: background-color var(--transition-speed) ease;
}

/* =================================
   PARTICLE SYSTEM (CANVAS)
   ================================= */
#particle-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

/* =================================
   BANNER CONTENT (Text & Info Layer)
   ================================= */
.banner-content {
  position: relative;
  z-index: 3;
  color: var(--text-color-banner);
  text-align: center;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: color var(--transition-speed) ease;
  max-width: 800px;
}

.banner-content h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  margin-bottom: 0.3em;
}

.banner-content h1 .name-highlight {
  color: var(--accent-color);
  transition: color var(--transition-speed) ease;
}

.banner-content p {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  margin-bottom: 1em;
  max-width: 600px;
  pointer-events: auto;
}

/* =================================
   SOCIAL ICONS
   ================================= */
.social-icons {
  display: flex;
  align-items: center;
  gap: 25px;
  margin-top: 15px;
  pointer-events: auto;
}

.social-icons a {
  text-decoration: none;
  line-height: 0;
}

.social-icons img {
  display: block;
  transition: transform var(--hover-transition-speed) ease-in-out,
  filter var(--hover-transition-speed) ease-in-out;
}

.social-icons img:hover {
  transform: scale(1.15) translateY(-4px);
}

/* =================================
   MAIN NAVIGATION (Below Banner)
   ================================= */
#main-nav {
  background-color: var(--nav-bg);
  padding: 15px 0;
  border-bottom: 1px solid var(--nav-border-bottom);
  transition: background-color var(--transition-speed) ease,
  border-color var(--transition-speed) ease;
}

.nav-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;
}

#main-nav a {
  color: var(--nav-text);
  text-decoration: none;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 4px;
  transition: color var(--hover-transition-speed) ease,
  background-color var(--hover-transition-speed) ease;
}

#main-nav a:hover {
  color: var(--nav-hover-text);
}

body.dark-mode #main-nav a:hover {
}

/* =================================
   ABOUT ME SECTION
   ================================= */
#about-me-section {
  background-color: var(--page-bg);
  color: var(--text-color-page);
  transition: background-color var(--transition-speed) ease;
}

#about-me-section .section-container p {
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 1em;
}

/* =================================
   PROFILE SECTION
   ================================= */
#profile-section {
  background-color: var(--page-bg);
  transition: background-color var(--transition-speed) ease;
  margin-bottom: 0;
}

.profile-content-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  max-width: 850px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .profile-content-area {
    flex-direction: row;
    align-items: flex-start;
    gap: 40px;
  }
}

.profile-image-container {
  flex-shrink: 0;
  display: flex;
  justify-content: center;
}

.profile-image-wrapper {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--accent-color);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transition: border-color var(--transition-speed) ease,
  box-shadow var(--transition-speed) ease;
}

@media (min-width: 768px) {
  .profile-image-wrapper {
    width: 220px;
    height: 220px;
  }
}

#profile-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: -50% center;
  transform: scale(2.1);
  display: block;
  transition: transform 0.4s ease;
}

.profile-image-wrapper:hover #profile-image {
  transform: scale(2.3);
}

.profile-text {
  flex-grow: 1;
  text-align: center;
  max-width: 600px;
}

@media (min-width: 768px) {
  .profile-text {
    text-align: left;
    max-width: 550px;
  }
}

.about-me-text {
  margin-bottom: 1.2em;
  line-height: 1.8;
  font-size: 1.05em;
  color: var(--text-color-page);
  transition: color var(--transition-speed) ease;
}

body.dark-mode .profile-image-wrapper {
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* =================================
   PROJECTS SECTION
   ================================= */
#projects-section {
  background-color: var(--page-bg);
  transition: background-color var(--transition-speed) ease;
}

.project-cards-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  padding-bottom: 60px;
}

.project-card {
  display: flex;
  flex-direction: column;
  width: 90%;
  max-width: 950px;
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--card-border-radius);
  box-shadow: var(--card-shadow);
  overflow: hidden;
  text-align: left;
  transition: transform var(--hover-transition-speed) ease,
  box-shadow var(--hover-transition-speed) ease,
  background-color var(--transition-speed) ease,
  border-color var(--transition-speed) ease;
}

@media (min-width: 768px) {
  .project-card {
    flex-direction: row;
    width: 85%;
  }
}


.project-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--card-hover-shadow);
}

.project-thumbnail {
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 250px;
}

@media (min-width: 768px) {
  .project-thumbnail {
    flex-basis: 40%;
    max-width: 380px;
    min-width: 250px;
    height: auto;
    aspect-ratio: 16 / 10;
  }
}

.project-thumbnail img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.project-card:hover .project-thumbnail img {
  transform: scale(1.05);
}

.project-details {
  flex-grow: 1;
  padding: 25px 30px;
  display: flex;
  flex-direction: column;
  color: var(--card-text-color);
  transition: color var(--transition-speed) ease;
}

@media (min-width: 768px) {
  .project-details {
    flex-basis: 60%;
    padding: 30px 40px;
  }
}


.project-details h3 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 1.5em;
  font-weight: 600;
  color: var(--text-color-page);
}

.project-tech {
  margin-bottom: 15px;
  font-size: 0.9em;
  line-height: 1.5;
}

.project-tech span {
  display: inline-block;
  background-color: var(--tech-tag-bg);
  color: var(--tech-tag-text);
  padding: 4px 10px;
  border-radius: 4px;
  margin-right: 6px;
  margin-bottom: 6px;
  font-weight: 500;
  transition: background-color var(--transition-speed) ease,
  color var(--transition-speed) ease;
}

.project-description {
  margin-bottom: 20px;
  flex-grow: 1;
}

.project-links {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.light-theme-img {
  display: block;
}

.dark-theme-img {
  display: none;
}

body.dark-mode .light-theme-img {
  display: none;
}

body.dark-mode .dark-theme-img {
  display: block;
}

.button {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95em;
  text-align: center;
  transition: background-color var(--hover-transition-speed) ease,
  color var(--hover-transition-speed) ease,
  border-color var(--hover-transition-speed) ease,
  transform var(--hover-transition-speed) ease;
  border: 1px solid transparent;
  cursor: pointer;
}

.button:hover {
  transform: translateY(-2px);
}

.button {
  background-color: var(--button-bg);
  color: var(--button-text);
  border-color: var(--button-bg);
}

.button:hover {
  background-color: var(--button-hover-bg);
  border-color: var(--button-hover-bg);
}

.button.button-outline {
  background-color: transparent;
  color: var(--button-outline-text);
  border: 1px solid var(--button-outline-border);
}

.button.button-outline:hover {
  background-color: var(--button-outline-hover-bg);
  color: var(--button-outline-hover-text);
  border-color: var(--button-outline-hover-bg)
}

/* =================================
   THEME TOGGLE BUTTON
   ================================= */
#theme-toggle {
  position: fixed;
  top: 15px;
  right: 15px;
  z-index: 100;
  padding: 5px;
  border: none;
  background-color: transparent;
  box-shadow: none;
  cursor: pointer;
  border-radius: 50%;
  line-height: 0;
  transition: opacity var(--hover-transition-speed) ease, transform var(--hover-transition-speed) ease;
}

#theme-toggle:hover {

  transform: scale(1.05);
  opacity: 0.8;
}

#theme-toggle img {
  display: block;
  width: 24px;
  height: 24px;
}


/* =================================
   DARK MODE THEME - SPECIFIC ELEMENT OVERRIDES
   ================================= */

body.dark-mode .social-icons img {
  filter: invert(1) brightness(0.9) contrast(1.1);
}

body.dark-mode .social-icons img:hover {
  filter: invert(1) brightness(1.1) contrast(1);
}

body.dark-mode #theme-toggle img {
  filter: invert(1) brightness(1.1);
}

body.dark-mode .profile-image-wrapper {
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}
