body {
  font-family: var(--font-stack);
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  padding-top: 70px; /* Prevents fixed header from covering content */
}
/* Background Canvas (Particle Network Layout) */
#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1; /* Locks it entirely behind text panels */
  pointer-events: none; /* Allows clicks to pass through to buttons */
}

/* Interactive Aurora Gradient Blobs Wrapper */
.gradient-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2; /* Layers behind the particle canvas */
  overflow: hidden;
  filter: blur(140px); /* Smoothly diffuses the crisp vector circles */
  opacity: 0.35; /* Subdued lighting intensity */
}

.blob {
  position: absolute;
  border-radius: 50%;
  /* Easing curve creates the fluid 'catching-up' lag effect with the mouse */
  transition: transform 0.15s cubic-bezier(0.25, 1, 0.5, 1);
  pointer-events: none;
}

.blob-1 {
  width: 600px;
  height: 600px;
  background-color: var(--accent-color);
  top: -300px; /* Offsets centerpoint back to cursor alignment */
  left: -300px;
}

.blob-2 {
  width: 500px;
  height: 500px;
  background-color: #4f46e5; /* Deep indigo secondary accent lamp */
  top: -250px;
  left: -250px;
}

/* Transparent sections let the canvas and aurora background render through */
section {
  position: relative;
  z-index: 1;
  background-color: transparent;
  padding: 5rem 2rem;

  margin: 0 auto;
}

header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 70px;
  background-color: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(8px); /* Premium glassmorphism blurring effect */
  border-bottom: 1px solid var(--border-color);
  z-index: 1000; /* Keeps global header always on top layer */
}

.nav-container {
  max-width: auto;
  margin: 0 auto;
  padding: 0 2rem;
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
/* top left header */
.logo {
  color: var(--text-main);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

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

/* header bar */
nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
}

nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

nav a:hover {
  color: var(--accent-color);
}

/* Section Header Accent Rules */
.section-title {
  color: var(--text-main);
  font-size: 2rem;
  margin-bottom: 2.5rem;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 40px;
  height: 3px;
  background-color: var(--accent-color);
  border-radius: 2px;
}

#home {
  min-height: calc(80vh - 70px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.hero-subtitle {
  color: var(--accent-color);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.hero-title {
  color: var(--text-main);
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -1px;
}

.hero-description {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: auto;
  margin-bottom: 2.5rem;
}

.cta-button {
  display: inline-block;
  background-color: transparent;
  color: var(--accent-color);
  border: 2px solid var(--accent-color);
  padding: 0.75rem 1.7rem;
  border-radius: 4px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.cta-button:hover {
  background-color: rgba(56, 189, 248, 0.1);
  color: var(--accent-hover);
  border-color: var(--accent-hover);
}

.about-content {
  display: table; /* Clean, flexible baseline alignment fallback */
  width: 100%;
}

.about-text {
  color: var(--text-main);
  display: table-cell;
  width: 60%;
  padding-right: 3rem;
  vertical-align: top;
}

.about-sidebar {
  display: table-cell;
  width: 40%;
  vertical-align: top;
  background-color: var(--surface-color);
  padding: 2rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
}

.about-img {
  width: 180px; /* Fixed width for a consistent look */
  height: 180px; /* Matches width to keep it perfectly square before rounding */
  border-radius: 50%; /* This converts the square image into a perfect circle */
  border: 3px solid var(--accent-color); /* Adds your electric blue theme border */
  object-fit: cover; /* Prevents your photo from stretching or distorting */
  display: block;
  margin: 0 auto 1.5rem auto; /* Centers the image and adds space below it */
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3); /* Premium depth shadow */
}

.sidebar-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1.2rem;
  color: var(--text-main);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
}

.skills-grid {
  display: block;
}

.skill-tag {
  display: inline-block;
  background-color: rgba(56, 189, 248, 0.06);
  color: var(--accent-color);
  border: 1px solid rgba(56, 189, 248, 0.2);
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  margin: 0.3rem;
  font-size: 0.85rem;
  font-family: monospace;
}

.skill-img {
  width: 30px; /* Forces the width to be small */
  height: 30px; /* Forces the height to be small */
  object-fit: contain; /* Acts like a digital 'crop' so it doesn't stretch */
  vertical-align: middle; /* Aligns the logo perfectly next to your text */
}

/* Outer wrapping channel window box */
.slider-wrapper {
  position: relative;
  width: 100%;
}

/* Continuous single horizontal flex track row container */
.projects-grid {
  display: flex;
  overflow-x: auto; /* Enables seamless slider behavior native tracking */
  scroll-snap-type: x mandatory; /* Snaps individual panels mechanically inline */
  gap: 1.5rem;
  padding: 1rem 0;
  scroll-behavior: smooth;
}

dialog.modal {
  border: none;
  border-radius: 16px;
  padding: 32px;
  max-width: auto;
  width: 90%;
  box-shadow:
    0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Strip scroll bar interface clutter to keep layout pure and clean */
.projects-grid::-webkit-scrollbar {
  display: none;
}

/* Individual Flex Project Interface Panels */
.project-card {
  flex: 0 0 calc(33.333% - 1rem); /* Standardizes layout exactly to 3 cards abreast on wide displays */
  scroll-snap-align: start; /* Locks layout snapping orientation to card edge bounding frame */
  background-color: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease;
}

.project-card:hover {
  transform: translateY(
    -4px
  ); /* Gentle vertical micro-lifting transform animation */
  border-color: rgba(56, 189, 248, 0.4);
}

.project-info {
  padding: 1.5rem;
}

.project-name {
  color: var(--text-main);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.project-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
  height: 70px;
  overflow: hidden; /* Normalizes paragraph variances bounding limits */
}

.project-tech {
  font-family: monospace;
  font-size: 0.8rem;
  color: var(--accent-color);
}

/* Dialog (Modal) Styling */
dialog.modal {
  background-color: var(--bg-color);
  color: var(--text-);
  border: none;
  border-radius: 16px;
  padding: 32px;
  width: 80% auto;
  height: 90% auto;
  box-shadow:
    0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
  margin: auto;
}
.modal strong {
  color: var(--text-main);
}

/* Dark background overlay */
dialog.modal::backdrop {
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.modal h2 {
  margin-top: 0;
  color: var(--accent-color);
}

.modal p {
  color: var(--text-main);
  line-height: 1.6;
}

/* Buttons inside modal */
.close-btn {
  background-color: #0969da;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  margin-top: 20px;
  transition: background-color 0.2s ease;
}

.close-btn:hover {
  background-color: #0451a5;
}

/* Dynamic Carousel Button Controllers */
.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(30, 41, 59, 0.8);
  border: 1px solid var(--border-color);
  color: var(--accent-color);
  font-size: 1.5rem;
  padding: 0.75rem 1rem;
  cursor: pointer;
  border-radius: 50%;
  z-index: 10;
  backdrop-filter: blur(4px);
  transition: all 0.2s ease;
}

.slider-btn:hover {
  background-color: var(--accent-color);
  color: var(--bg-color);
}

.prev-btn {
  left: -1.5rem;
}
.next-btn {
  right: -1.5rem;
}

.footer {
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
  text-align: center;
  padding: 2.5rem 0;
  font-size: 0.9rem;
}

.footer a {
  color: var(--accent-color);
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

@media (max-width: 900px) {
  /* Scales carousel track view to match two projects on screen wide */
  .project-card {
    flex: 0 0 calc(50% - 1rem);
  }
}

@media (max-width: 768px) {
  /* Transforms structural tables into single linear layout column streams */
  .about-content,
  .about-text,
  .about-sidebar {
    display: block;
    width: 100%;
    padding-right: 0;
  }
  .about-sidebar {
    margin-top: 2rem;
  }
  .hero-title {
    font-size: 2.5rem;
  }
  /* Removes clicking layout indicators on touch screen units */
  .slider-btn {
    display: none;
  }
}

@media (max-width: 600px) {
  /* Sets cards to full screen slide frames for easy swiping on phones */
  .project-card {
    flex: 0 0 85%;
  }
}
