/* --- RESET & VARIABLES --- */
:root {
  --bg-body: #050505;
  --text-main: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.6);
  --accent-primary: #00f260;
  --accent-secondary: #0575e6;
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-blur: blur(24px);
  --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4),
    0 0 1px 0 rgba(255, 255, 255, 0.1) inset;
  --nav-bg: rgba(10, 10, 10, 0.4);
  --font-heading: 'Space Grotesk', sans-serif;
  --font-body: 'Outfit', sans-serif;
  --particle-color: 0x00f260;
}

/* Light Mode Overrides */
/* Greenish-Blue Light Mode */
.light-mode {
  --bg-body: #fdfdfd;
  /* Clean Light Gray Background */
  --text-main: #1a1a1a;
  /* High contrast dark text */
  --text-muted: #555555;
  /* Readable gray text */
  --accent-primary: #10b981;
  /* Emerald green */
  --accent-secondary: #3b82f6;
  /* Azure blue */
  --glass-bg: rgba(255, 255, 255, 0.85);
  /* Near-opaque glass for best readability */
  --glass-border: rgba(0, 0, 0, 0.1);
  /* Definitive border */
  --glass-blur: blur(16px);
  --card-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.1);
  --nav-bg: rgba(255, 255, 255, 0.9);
  --particle-color: 0x10b981;
}

.light-mode .bg-gradient {
  background: radial-gradient(
      circle at 15% 30%,
      rgba(0, 0, 0, 0.06),
      transparent 35%
    ),
    radial-gradient(
      circle at 85% 15%,
      rgba(0, 0, 0, 0.08),
      /* Grey shade in circle */ transparent 30%
    ),
    radial-gradient(circle at 50% 85%, rgba(0, 0, 0, 0.04), transparent 45%);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-body);
  color: var(--text-main);
  overflow-x: hidden;
  min-height: 100vh;
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* --- BACKGROUND ANIMATION --- */
.bg-gradient {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  background: radial-gradient(
      circle at 15% 50%,
      rgba(5, 117, 230, 0.15),
      transparent 25%
    ),
    radial-gradient(circle at 85% 30%, rgba(0, 242, 96, 0.1), transparent 25%);
  filter: blur(60px);
  animation: bgPulse 10s ease-in-out infinite alternate;
}

@keyframes bgPulse {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }

  100% {
    transform: scale(1.1);
    opacity: 1;
  }
}

#heroCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.6;
  pointer-events: none;
}

/* --- TYPOGRAPHY --- */
h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-main);
  /* Updated to variable */
}

a {
  text-decoration: none;
  color: inherit;
  transition: 0.3s;
}

/* --- UTILITIES --- */
.glass {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur) saturate(180%);
  -webkit-backdrop-filter: var(--glass-blur) saturate(180%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--card-shadow);
  border-radius: 16px;
  transition: all 0.3s ease;
  position: relative;
}

.glass::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 16px;
  padding: 1px;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.1),
    rgba(255, 255, 255, 0.05)
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
}

.glass:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.5),
    0 0 1px 0 rgba(255, 255, 255, 0.2) inset;
  transform: translateY(-2px);
}

/* Light mode glass hover */
.light-mode .glass:hover {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(88, 110, 117, 0.35);
  box-shadow: 0 12px 40px 0 rgba(88, 110, 117, 0.25),
    0 0 1px 0 rgba(255, 255, 255, 0.6) inset;
  transform: translateY(-2px);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section-title {
  font-size: 3rem;
  text-align: center;
  margin-bottom: 60px;
  background: linear-gradient(to right, var(--text-main), var(--text-muted));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -1px;
}

/* --- NAVIGATION --- */
.nav-wrapper {
  position: fixed;
  top: 20px;
  left: 0;
  width: 100%;
  z-index: 100;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.nav {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 12px 30px;
  border-radius: 50px;
  background: var(--nav-bg);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  border: 1px solid var(--glass-border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2),
    0 0 1px 0 rgba(255, 255, 255, 0.1) inset;
  transition: transform 0.3s ease, background 0.3s ease;
}

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

.nav .brand {
  display: none;
  /* Hide text brand */
}

.profile-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent-primary);
  transition: transform 0.3s ease;
  margin-right: 10px;
}

.profile-icon:hover {
  transform: scale(1.1);
  box-shadow: 0 0 15px var(--accent-primary);
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-main);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--accent-primary);
  transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* Toggle Button */
.theme-toggle {
  background: transparent;
  border: none;
  color: var(--text-main);
  cursor: pointer;
  font-size: 1.2rem;
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

.theme-toggle:hover {
  transform: rotate(15deg) scale(1.1);
}

.theme-toggle:hover {
  transform: rotate(15deg) scale(1.1);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background-color: var(--text-main);
  transition: 0.3s;
}

.nav-links {
  display: flex;
  gap: 20px;
  align-items: center;
}

/* --- HERO SECTION --- */
.hero {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  padding-top: 60px;
}

.hero-content {
  z-index: 2;
  max-width: 900px;
}

.hero h1 {
  font-size: 5rem;
  line-height: 1;
  margin-bottom: 20px;
  letter-spacing: -2px;
  background: linear-gradient(
    135deg,
    var(--text-main) 0%,
    var(--text-muted) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Role Rotator */
.role-container {
  font-size: 1.8rem;
  font-weight: 600;
  margin: 20px 0 30px;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.role-label {
  color: var(--text-muted);
  font-weight: 400;
}

.role-text {
  background: linear-gradient(
    135deg,
    var(--accent-primary),
    var(--accent-secondary)
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
  display: inline-block;
  min-width: 280px;
  text-align: left;
  /* animation: roleRotate 3s ease-in-out infinite; */
}

@keyframes roleRotate {
  0%,
  100% {
    opacity: 0;
    transform: translateY(10px);
  }
  10%,
  90% {
    opacity: 1;
    transform: translateY(0);
  }
}

.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--text-main);
  color: var(--bg-body);
}

.btn-primary:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(128, 128, 128, 0.3);
}

.btn-secondary {
  background: transparent;
  border-color: var(--glass-border);
  color: var(--text-main);
  margin-left: 15px;
}

.btn-secondary:hover {
  background: var(--glass-bg);
  border-color: var(--text-main);
}

/* --- SECTIONS --- */
section {
  padding: 150px 0;
  scroll-margin-top: 100px;
}

/* --- ABOUT --- */
.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 60px;
  align-items: center;
  margin-bottom: 200px;
}

.about-text p {
  margin-bottom: 20px;
  font-size: 1.1rem;
  color: var(--text-muted);
  text-align: justify;
}

.about-card {
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.about-card:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 16px 50px 0 rgba(0, 0, 0, 0.5), 0 0 30px rgba(0, 242, 96, 0.15),
    0 0 1px 0 rgba(255, 255, 255, 0.2) inset;
  transform: translateY(-2px);
}

.about-card::before {
  content: '';
  position: absolute;
  width: 150px;
  height: 150px;
  background: var(--accent-primary);
  filter: blur(80px);
  border-radius: 50%;
  animation: float 6s infinite ease-in-out;
}

@keyframes float {
  0%,
  100% {
    transform: translate(0, 0);
  }

  50% {
    transform: translate(20px, -20px);
  }
}

/* --- VISIONARY CARD 3D --- */
.about-card {
  perspective: 1000px;
  transform-style: preserve-3d;
  cursor: pointer;
}

.card-inner {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-style: preserve-3d;
  transition: transform 0.1s ease-out;
  /* Smooth tilt */
}

.glare {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background: linear-gradient(
    125deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.1) 45%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: translateY(100%);
  transition: transform 0.1s;
  pointer-events: none;
  z-index: 3;
  opacity: 0.6;
}

.brain-visual {
  position: absolute;
  width: 80%;
  height: 80%;
  z-index: 1;
  opacity: 0.8;
  transform: translateZ(20px);
  /* Parallax depth */
}

.pulse-glow {
  animation: pulse 3s infinite ease-in-out;
}

.conn-line {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: dash 3s infinite linear;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.4;
  }

  50% {
    transform: scale(1.1);
    opacity: 0.7;
  }
}

@keyframes dash {
  to {
    stroke-dashoffset: 0;
  }
}

/* --- SKILLS --- */
.skills-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.skill-group h3 {
  text-align: center;
  margin-bottom: 10px;
  font-size: 20px;
  color: var(--text-main);
  background: linear-gradient(
    135deg,
    var(--accent-primary),
    var(--accent-secondary)
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.skill-card {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  font-weight: 500;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.skill-card span:first-child {
  margin-bottom: 5px;
  font-weight: 600;
  color: var(--text-main);
}

.progress-bar {
  height: 5px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 5px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(
    90deg,
    var(--accent-primary),
    var(--accent-secondary)
  );
  width: 0;
  border-radius: 5px;
  transition: width 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: width;
}

.glass {
  backdrop-filter: blur(8px);
  font-size: 17px;
}

.section-title {
  text-align: center;
  margin-bottom: 30px;
  font-size: 2rem;
}

/* --- GITHUB STATS --- */
.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-title {
  background: linear-gradient(
    to right,
    var(--accent-primary),
    var(--accent-secondary)
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 3rem;
  letter-spacing: -1px;
}

.section-subtitle {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-top: 15px;
  font-weight: 300;
}

.github-stats-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 50px;
}

.github-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 40px;
  width: 100%;
  max-width: 1200px;
}

.github-stat-card-wrapper {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur) saturate(180%);
  -webkit-backdrop-filter: var(--glass-blur) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 30px;
  box-shadow: var(--card-shadow);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  display: flex;
  flex-direction: column;
  min-height: 220px;
  position: relative;
  overflow: hidden;
}

.github-stat-card-wrapper:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent-primary);
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 242, 96, 0.1);
}

.github-data-card {
  width: 100%;
  animation: fadeIn 0.5s ease-out forwards;
}

.hidden {
  display: none !important;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Stat Header */
.stat-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 25px;
}

.gh-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid var(--accent-primary);
  padding: 2px;
}

.gh-user-info h3 {
  font-size: 1.2rem;
  margin: 0;
  color: var(--text-main);
}

.gh-user-info p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
}

/* Stat Grid */
.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-primary);
}

/* Languages List */
.card-title {
  font-size: 1.2rem;
  margin-bottom: 20px;
  color: var(--text-main);
  text-align: left;
}

.langs-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lang-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.lang-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
}

.lang-name {
  font-weight: 600;
}

.lang-bar-bg {
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
}

.lang-bar-fill {
  height: 100%;
  background: var(--accent-primary);
  border-radius: 3px;
  transition: width 1s ease-out;
}

/* Recent Repo */
.recent-repo-item {
  background: rgba(255, 255, 255, 0.03);
  padding: 15px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
}

.recent-repo-item h4 {
  color: var(--accent-primary);
  margin-bottom: 8px;
  font-size: 1.1rem;
}

.recent-repo-item p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.repo-meta {
  display: flex;
  gap: 15px;
  font-size: 0.8rem;
  color: var(--text-main);
}

.github-activity-footer {
  margin-top: 15px;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
}

/* Loader */
.stats-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 15px;
  width: 100%;
  height: 100%;
}

.loader {
  width: 40px;
  height: 40px;
  border: 3px solid var(--glass-border);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.github-profile-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 32px;
  background: linear-gradient(
    135deg,
    var(--accent-primary),
    var(--accent-secondary)
  );
  color: white;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: 0 8px 25px rgba(0, 242, 96, 0.3);
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
}

.github-profile-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s;
}

.github-profile-link:hover::before {
  left: 100%;
}

.github-profile-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(0, 242, 96, 0.4);
  border-color: rgba(255, 255, 255, 0.3);
}

.github-profile-link svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
  transition: transform 0.3s ease;
}

.github-profile-link:hover svg {
  transform: scale(1.1);
}

/* Light mode GitHub stats enhancements */
.light-mode .github-stat-card-wrapper {
  background-image: linear-gradient(var(--glass-bg), var(--glass-bg)),
    linear-gradient(145deg, #1abc9c, #0084d1);
}

.light-mode .github-stat-card-wrapper:hover {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(26, 188, 156, 0.4);
  box-shadow: 0 20px 60px 0 rgba(26, 188, 156, 0.15),
    0 0 40px rgba(26, 188, 156, 0.1), 0 0 1px 0 rgba(255, 255, 255, 0.6) inset;
}

.light-mode .github-profile-link {
  box-shadow: 0 8px 25px rgba(26, 188, 156, 0.25);
}

.light-mode .github-profile-link:hover {
  box-shadow: 0 12px 35px rgba(26, 188, 156, 0.35);
}

/* --- PORTFOLIO --- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 25px;
  margin-bottom: 100px;
}

.project-card {
  position: relative;
  overflow: hidden;
  height: 280px;
  cursor: pointer;
  transition: transform 0.4s ease, background 0.3s, border-color 0.3s,
    box-shadow 0.3s;
}

.project-card:hover {
  transform: translateY(-10px);
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 20px 60px 0 rgba(0, 0, 0, 0.6), 0 0 35px rgba(0, 242, 96, 0.2),
    0 0 1px 0 rgba(255, 255, 255, 0.2) inset;
}

.project-thumb {
  height: 60%;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  transition: transform 0.4s ease;
}

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

.project-info {
  padding: 20px;
  height: 40%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.project-title {
  font-size: 1.2rem;
  margin-bottom: 5px;
}

.project-cat {
  font-size: 0.9rem;
  color: var(--accent-primary);
  font-weight: 500;
}

/* Project Link Styling */
.project-link {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

.project-link:hover {
  text-decoration: none;
  color: inherit;
}

/* --- TIMELINE --- */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  margin-bottom: 200px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 100%;
  background: var(--glass-border);
}

.timeline-item {
  margin-bottom: 40px;
  width: 100%;
  display: flex;
  justify-content: center;
  position: relative;
}

.timeline-content {
  width: 45%;
  padding: 25px;
  position: relative;
  transition: background 0.3s, border-color 0.3s, box-shadow 0.3s,
    transform 0.3s;
}

.timeline-content:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 16px 50px 0 rgba(0, 0, 0, 0.5),
    0 0 1px 0 rgba(255, 255, 255, 0.2) inset;
  transform: scale(1.02);
}

.timeline-item:nth-child(odd) .timeline-content {
  margin-right: auto;
  text-align: right;
}

.timeline-item:nth-child(even) .timeline-content {
  margin-left: auto;
  text-align: left;
}

.timeline-dot {
  position: absolute;
  left: 50%;
  top: 25px;
  transform: translateX(-50%);
  width: 16px;
  height: 16px;
  background: var(--bg-body);
  border: 2px solid var(--accent-primary);
  border-radius: 50%;
  z-index: 10;
  box-shadow: 0 0 10px var(--accent-primary);
}

.timeline-date {
  color: var(--accent-primary);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* --- CONTACT --- */
.contact-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 40px;
  transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.contact-container:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 16px 50px 0 rgba(0, 0, 0, 0.5),
    0 0 1px 0 rgba(255, 255, 255, 0.2) inset;
}

.form-group {
  margin-bottom: 20px;
}

.form-control {
  width: 100%;
  padding: 15px;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  color: var(--text-main);
  font-family: inherit;
  transition: all 0.3s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-primary);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 20px rgba(0, 242, 96, 0.1),
    0 0 1px 0 rgba(255, 255, 255, 0.2) inset;
}

/* --- FOOTER --- */
footer {
  padding: 50px 0;
  text-align: center;
  border-top: 1px solid var(--accent-primary);
  margin-top: 50px;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.3) 0%,
    rgba(0, 0, 0, 0.7) 100%
  );
  position: relative;
  box-shadow: 0 -5px 20px rgba(0, 242, 96, 0.1); /* Neon hint for dark mode */
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
    circle at 50% 0%,
    rgba(0, 242, 96, 0.15),
    transparent 70%
  );
  pointer-events: none;
}

/* Light Mode Footer Override */
.light-mode footer {
  border-top: 1px solid var(--text-muted);
  background: linear-gradient(
    180deg,
    rgba(13, 95, 90, 0.9) 0%,
    rgba(5, 50, 48, 1) 100%
  );
  box-shadow: none;
}

.light-mode footer p {
  color: rgba(255, 255, 255, 0.7); /* Ensure text is visible on dark footer */
}

.light-mode footer::before {
  background: none; /* Remove neon glow in light mode */
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
}

.social-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--glass-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.3s;
  border: 1px solid var(--glass-border);
}

.social-icon:hover {
  background: var(--accent-primary);
  transform: translateY(-3px);
  border-color: var(--accent-primary);
}

.social-icon img {
  width: 20px;
  height: 20px;
  filter: invert(0);
  /* Default: White icons for Dark Mode */
}

/* Light Mode: Invert to make them black/dark */
.light-mode .social-icon img {
  filter: invert(0);
}

.light-mode .social-icon:hover img {
  filter: invert(0);
  /* White on hover */
}

/* --- RESPONSIVE --- */
@media (max-width: 1400px) {
  .projects-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 1100px) {
  .projects-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .section {
    padding: 100px 0;
  }
}

@media (max-width: 768px) {
  .section {
    padding: 80px 0;
  }

  .hero h1 {
    font-size: 3rem;
  }

  .role-container {
    font-size: 1.4rem;
    flex-direction: column;
    gap: 5px;
  }

  .role-text {
    min-width: auto;
    text-align: center;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about-card {
    height: 300px;
  }

  .timeline::before {
    left: 20px;
  }

  .timeline-item {
    flex-direction: column;
    align-items: flex-start;
    margin-left: 20px;
    margin-bottom: 30px;
  }

  .timeline-content {
    width: 100%;
    text-align: left !important;
    padding: 15px;
  }

  .timeline-dot {
    left: 0;
    transform: none;
  }

  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }

  .project-card {
    height: 240px;
  }

  .nav {
    padding: 15px 20px;
    border-radius: 20px;
    width: 90%;
    margin: 0 auto;
  }

  .nav .brand {
    display: block;
    font-weight: 700;
    font-size: 1.2rem;
  }

  .profile-icon {
    width: 35px;
    height: 35px;
  }

  .hamburger {
    display: flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--nav-bg);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    padding: 20px;
    border-radius: 20px;
    margin-top: 10px;
    flex-direction: column;
    gap: 15px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  }

  .nav-links a {
    display: block; /* Ensure links are visible in the dropdown */
    font-size: 1.1rem;
    padding: 10px;
  }

  .nav.active .nav-links {
    display: flex;
  }

  /* Hamburger Animation */
  .nav.active .hamburger span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .nav.active .hamburger span:nth-child(2) {
    opacity: 0;
  }

  .nav.active .hamburger span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 2.5rem;
  }

  .section-title {
    font-size: 2rem;
    margin-bottom: 40px;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .skills-grid {
    grid-template-columns: 1fr; /* Single column for very small screens */
  }

  .btn {
    padding: 12px 24px;
    width: 100%;
    margin: 10px 0 0 0;
    text-align: center;
  }

  .btn-secondary {
    margin-left: 0;
  }

  .contact-container {
    padding: 20px;
  }
}
