/* --------------------------------------------------
   Global Reset & Base Styles
-------------------------------------------------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  cursor: none;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  transition: background 0.5s, color 0.5s;
}

/* --------------------------------------------------
   Root Variables
-------------------------------------------------- */
:root {
  --brand-color: #2b3cfe;
  --brand-gradient: linear-gradient(135deg, #2b3cfe, #8e44ad);
  --surface-dark: rgba(255, 255, 255, 0.08);
  --surface-light: rgba(255, 255, 255, 0.85);
}

/* --------------------------------------------------
   Color Modes
-------------------------------------------------- */
body:not(.dark-mode) {
  background: radial-gradient(circle at 20% 20%, #eef2ff 0, transparent 35%),
              radial-gradient(circle at 80% 0, #fff2f8 0, transparent 30%),
              linear-gradient(45deg, #ffffff, #f7f7f7);
  color: #333;
}

.dark-mode {
  background: radial-gradient(circle at 10% 20%, rgba(53, 71, 255, 0.35) 0, transparent 30%),
              radial-gradient(circle at 90% 10%, rgba(142, 68, 173, 0.3) 0, transparent 25%),
              linear-gradient(45deg, #121212, #2c2c2c);
  color: white;
}

/* --------------------------------------------------
   Global Overrides for Light Mode
-------------------------------------------------- */
body:not(.dark-mode) .navbar,
body:not(.dark-mode) .toggle-switch {
  background: #ddd;
}

body:not(.dark-mode) .navbar .logo,
body:not(.dark-mode) .nav-links a {
  color: #333;
}

body:not(.dark-mode) .hero {
  background: linear-gradient(135deg, #eaeaea, #ffffff);
  color: #333;
}

/* Update hero title for light mode with a darker gradient */
body:not(.dark-mode) .hero-title {
  background: linear-gradient(90deg, var(--brand-color), #2b3cfe);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Ensure contact text is dark in light mode */
body:not(.dark-mode) .contact,
body:not(.dark-mode) .contact-info {
  color: #333;
}

body:not(.dark-mode) .glass,
body:not(.dark-mode) .contact-container {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

body:not(.dark-mode) .contact-container {
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Section Headings */
.section h2 {
  position: relative;
  font-size: 2.4em;
  text-align: center;
  letter-spacing: 0.02em;
}

.section h2::after {
  content: "";
  display: block;
  width: 80px;
  height: 4px;
  margin: 10px auto 0;
  background: var(--brand-gradient);
  border-radius: 999px;
  box-shadow: 0 8px 30px rgba(43, 60, 254, 0.25);
}

/* --------------------------------------------------
   Custom Cursor & Particle Canvas
-------------------------------------------------- */
#customCursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: transform 0.1s ease-out, background 0.3s;
  z-index: 10000;
}

body:not(.dark-mode) #customCursor {
  background: rgba(0, 0, 0, 0.8);
}

.dark-mode #customCursor {
  background: rgba(255, 255, 255, 0.9);
}

#particleCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

/* --------------------------------------------------
   Glass Effect Utility
-------------------------------------------------- */
.glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

body:not(.dark-mode) .glass {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

/* --------------------------------------------------
   Navbar & Navigation
-------------------------------------------------- */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  backdrop-filter: blur(10px);
  z-index: 1000;
  transition: padding 0.3s, background 0.3s, box-shadow 0.3s;
  background: rgba(0, 0, 0, 0.6);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.navbar.scrolled {
  padding: 10px 20px;
  background: rgba(0, 0, 0, 0.8);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.3);
}

body:not(.dark-mode) .navbar {
  background: rgba(255, 255, 255, 0.9);
}

/* Logo & Navigation Links */
.logo-img {
  height: 30px;
  transition: transform 0.3s ease;
}

.logo-img:hover {
  transform: scale(1.1);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 15px;
}

.nav-links a {
  text-decoration: none;
  position: relative;
  transition: color 0.3s;
  color: white;
}

/* Light mode link color and hover override */
body:not(.dark-mode) .nav-links a {
  color: #333;
}

body .nav-links a:hover {
  color: var(--brand-color);
}

.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -5px;
  height: 3px;
  background: linear-gradient(135deg, var(--brand-color), #8e44ad);
  border-radius: 2px;
  box-shadow: 0 0 10px rgba(52, 152, 219, 0.7);
  transition: all 0.3s ease;
}

.dark-mode .nav-links a.active::after {
  background: linear-gradient(135deg, #8e44ad, var(--brand-color));
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Toggle Switch */
.toggle-switch {
  width: 60px;
  height: 30px;
  border-radius: 15px;
  background: #333;
  position: relative;
  border: none;
  cursor: none;
  outline: none;
  transition: background 0.3s;
}

.toggle-icon {
  font-size: 1.2em;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  transition: left 0.3s;
}

.toggle-switch.dark .toggle-icon {
  left: 32px;
}

.toggle-switch:not(.dark) .toggle-icon {
  left: 6px;
}

/* --------------------------------------------------
   Hero Section
-------------------------------------------------- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  animation: fadeIn 1.5s ease-in-out;
  background: linear-gradient(135deg, #161616, #000);
  color: white;
  position: relative;
  overflow: hidden;
}

body:not(.dark-mode) .hero {
  background: linear-gradient(135deg, #eaeaea, #ffffff);
  color: #333;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.4;
  z-index: 0;
}

.hero::before {
  width: 320px;
  height: 320px;
  background: var(--brand-gradient);
  top: 12%;
  left: 18%;
}

.hero::after {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255,255,255,0.4), transparent 65%);
  bottom: 5%;
  right: 12%;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero-kicker {
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #f0f0f0;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.75em;
  margin-bottom: 18px;
  backdrop-filter: blur(6px);
}

.hero-title {
  font-size: clamp(2.8em, 4vw, 3.6em);
  text-align: center;
  margin-bottom: 10px;
  background: linear-gradient(90deg, #f8f8f8, #ccc);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.5em;
  max-width: 600px;
  margin-bottom: 30px;
  opacity: 0;
  animation: slideUp 1s forwards 0.5s;
  text-align: center;
}

/* Hero Buttons */
.hero-buttons {
  display: flex;
  gap: 20px;
  margin-top: 20px;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 10px 0 5px;
}

.hero-badge {
  padding: 10px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 0.95em;
  backdrop-filter: blur(4px);
  color: inherit;
}

.hero-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 24px;
}

.meta-pill {
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 0.95em;
  letter-spacing: 0.02em;
  color: inherit;
  backdrop-filter: blur(8px);
}

body:not(.dark-mode) .hero-badge,
body:not(.dark-mode) .meta-pill {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.08);
}

.explore-btn,
.cv-btn {
  padding: 12px 30px;
  font-size: 1.1em;
  border: none;
  border-radius: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: none;
  text-decoration: none;
  transition: transform 0.3s, background 0.3s;
}

.explore-btn {
  background: #fff;
  color: #333;
}

body:not(.dark-mode) .explore-btn {
  background: #333;
  color: #fff;
}

.explore-btn:hover,
.cv-btn:hover {
  transform: scale(1.05);
}

.cv-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--brand-color), #7f7ff3);
  color: #fff;
  text-decoration: none;
}

.cv-btn:hover {
  background: linear-gradient(135deg, #7f7ff3, var(--brand-color));
}

.cv-btn i {
  margin-right: 8px;
}

/* --------------------------------------------------
   About Section
-------------------------------------------------- */
.about {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.about-container {
  display: flex;
  align-items: center;
  gap: 20px;
  max-width: 800px;
  margin-top: 20px;
  padding: 20px;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  transition: background 0.3s, box-shadow 0.3s;
}

.about-highlight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 25px;
  width: 100%;
  max-width: 1000px;
}

.highlight-card {
  padding: 18px;
  border-radius: 14px;
  background: var(--surface-dark);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.15);
  text-align: left;
}

.highlight-card h3 {
  margin-bottom: 8px;
  font-size: 1.2em;
}

.highlight-card p {
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.5;
}

body:not(.dark-mode) .highlight-card {
  background: var(--surface-light);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.08);
}

body:not(.dark-mode) .highlight-card p {
  color: #444;
}

.profile-photo {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--brand-color);
}

.about-text {
  flex: 1;
  font-size: 1.1em;
  text-align: left;
}

@media (max-width: 600px) {
  .about-container {
    flex-direction: column;
  }
  .about-text {
    text-align: center;
  }
}

/* --------------------------------------------------
   Scroll Container & Section Layout
-------------------------------------------------- */
.scroll-container {
  height: 100vh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
}

.section {
  min-height: 100vh;
  padding: 120px 20px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* --------------------------------------------------
   Portfolio Section
-------------------------------------------------- */
.portfolio {
  padding: 60px 20px;
  text-align: center;
}

.portfolio h2 {
  font-size: 2.5em;
  margin-bottom: 30px;
  color: #333;
}

body.dark-mode .portfolio h2 {
  color: #fff;
}

.portfolio-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
}

.portfolio-card {
  width: 320px;
  border-radius: 15px;
  overflow: hidden;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.3);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: none;
}

.portfolio-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.portfolio-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.portfolio-content {
  padding: 20px;
  text-align: left;
}

.portfolio-content h3 {
  font-size: 1.8em;
  margin: 0 0 10px;
  color: #333;
}

.portfolio-content p {
  font-size: 1em;
  line-height: 1.4;
  margin-bottom: 15px;
  color: #555;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
}

.tag {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(43, 60, 254, 0.12);
  color: #2b3cfe;
  font-size: 0.9em;
  border: 1px solid rgba(43, 60, 254, 0.25);
}

.portfolio-link {
  display: inline-flex;
  align-items: center;
  font-size: 1em;
  color: var(--brand-color);
  text-decoration: none;
  border: 2px solid var(--brand-color);
  padding: 8px 15px;
  border-radius: 30px;
  transition: background 0.3s, color 0.3s;
}

.portfolio-link:hover {
  background: var(--brand-color);
  color: #fff;
}

.portfolio-link i {
  margin-right: 8px;
}

body.dark-mode .portfolio-card {
  border: 1px solid rgba(255,255,255,0.2);
  box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

body.dark-mode .portfolio-content h3,
body.dark-mode .portfolio-content p {
  color: #f0f0f0;
}

body.dark-mode .tag {
  background: rgba(255, 255, 255, 0.08);
  color: #e6e6e6;
  border-color: rgba(255, 255, 255, 0.18);
}

body.dark-mode .portfolio-link {
  color: #8e44ad;
  border-color: #8e44ad;
}

body.dark-mode .portfolio-link:hover {
  background: #8e44ad;
  color: #fff;
}

/* --------------------------------------------------
   Timeline & Experience Section
-------------------------------------------------- */
.timeline-container {
  margin: 40px auto;
  max-width: 900px;
  padding: 0 20px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 20px;
  margin-bottom: 40px;
  align-items: flex-start;
}

.timeline-bar-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.timeline-bar {
  width: 4px;
  height: 100%;
  background: linear-gradient(to bottom, var(--brand-color), #8e44ad);
  border-radius: 2px;
  position: absolute;
  top: 0;
}

.timeline-dot {
  width: 16px;
  height: 16px;
  background: #fff;
  border: 3px solid var(--brand-color);
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  margin-top: 20px;
  z-index: 2;
}

/* Experience Card */
.experience-card {
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.experience-header {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
}

.experience-logo {
  width: 80px;
  height: 80px;
  border-radius: 10px;
  object-fit: cover;
  margin-right: 15px;
  border: 2px solid var(--brand-color);
}

.experience-info h3 {
  margin: 0;
  font-size: 1.5em;
}

.experience-date {
  display: inline-block;
  margin-top: 5px;
  padding: 4px 8px;
  font-size: 0.9em;
  background: rgba(0,0,0,0.1);
  color: #333;
  border-radius: 4px;
}

.experience-bullets {
  list-style: disc;
  padding-left: 20px;
  font-size: 1.1em;
}

.experience-bullets li {
  margin-bottom: 8px;
}

.experience-bullets a {
  color: var(--brand-color);
  text-decoration: none;
}

.experience-bullets a:hover {
  text-decoration: underline;
}

.dark-mode .experience-bullets a {
  color: #8e44ad;
}

.dark-mode .experience-card {
  border: 1px solid rgba(255,255,255,0.2);
  box-shadow: 0 5px 15px rgba(0,0,0,0.7);
  color: #f0f0f0;
}

.dark-mode .experience-date {
  background: rgba(255,255,255,0.1);
  color: #ccc;
}

.dark-mode .timeline-bar {
  background: linear-gradient(to bottom, #8e44ad, var(--brand-color));
}

.dark-mode .timeline-dot {
  border-color: #8e44ad;
}

/* --------------------------------------------------
   Contact & Social Section
-------------------------------------------------- */
.contact {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px 20px;
  text-align: center;
  color: #fff;
}

.contact-container {
  max-width: 800px;
  width: 100%;
  padding: 40px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.3);
  box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.contact-info h2 {
  font-size: 2.5em;
  margin-bottom: 10px;
}

.contact-info p {
  font-size: 1.2em;
  margin-bottom: 20px;
  line-height: 1.5;
}

.contact-btn {
  padding: 12px 30px;
  font-size: 1.1em;
  border: none;
  border-radius: 50px;
  background: var(--brand-color);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: none;
  text-decoration: none;
  transition: transform 0.3s, background 0.3s;
}

.contact-btn:hover {
  transform: scale(1.05);
  background: #8e44ad;
}

.contact-pills {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

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

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  font-size: 1.8em;
  border: 2px solid rgba(255,255,255,0.5);
  border-radius: 50%;
  transition: transform 0.3s, background 0.3s;
  color: #fff;
}

body:not(.dark-mode) .social-link {
  border: 2px solid rgba(0,0,0,0.3);
  color: #333;
}

.social-link:hover {
  transform: scale(1.1);
  background: rgba(255,255,255,0.3);
}

/* --------------------------------------------------
   Ripple Effect
-------------------------------------------------- */
.ripple {
  position: relative;
  overflow: hidden;
}

.ripple::after {
  content: "";
  position: absolute;
  background: rgba(255,255,255,0.5);
  width: 0;
  height: 0;
  border-radius: 50%;
  opacity: 0;
  transform: scale(1);
  pointer-events: none;
  transition: width 0.5s ease-out, height 0.5s ease-out, opacity 1s;
}

/* --------------------------------------------------
   Scrollbar Customization
-------------------------------------------------- */
.scroll-container::-webkit-scrollbar {
  width: 8px;
}

.scroll-container::-webkit-scrollbar-track {
  background: rgba(0,0,0,0.1);
}

.scroll-container::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.3);
  border-radius: 4px;
}

/* --------------------------------------------------
   Media Queries
-------------------------------------------------- */
@media (max-width: 768px) {
  .navbar {
    padding: 15px;
  }
  .nav-links {
    display: none;
  }
  .logo-img {
    width: 50px;
    height: auto;
    margin-right: 0;
  }
  .timeline-item {
    display: block;
    margin-bottom: 40px;
  }
  .timeline-bar-container {
    display: none;
  }
  .experience-card {
    margin: 20px 0 0;
  }
  .scroll-container::-webkit-scrollbar {
    width: 0;
    display: none;
  }
  .scroll-container {
    -ms-overflow-style: none;
    scrollbar-width: none;
  }
}

/* Hide the cursor on devices where default cursor detection isn’t possible */
@media (hover: none) and (pointer: coarse) {
  body, .scroll-container, .scroll-container * {
    cursor: none !important;
  }
}

/* Force clickable elements to use "none" for cursor */
a, button, .portfolio-link, .contact-btn {
  cursor: none !important;
}

/* --------------------------------------------------
   Animations
-------------------------------------------------- */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

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

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-50px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes zoomIn {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}
