/* ===== Variables ===== */
:root {
  /* Colors */
  --dark-bg: #0a192f;
  --light-bg: #112240;
  --lightest-bg: #233554;
  --text-primary: #e6f1ff;
  --text-secondary: #b3c6ff;
  --accent: #64ffda;
  --accent-light: rgba(100, 255, 218, 0.1);
  
  /* Typography */
  --font-primary: 'Space Grotesk', sans-serif;
  --font-secondary: 'Manrope', sans-serif;
  
  /* Spacing */
  --section-padding: 120px;
  --container-width: 1200px;
  
  /* Effects */
  --transition: all 0.25s cubic-bezier(0.645, 0.045, 0.355, 1);
  --box-shadow: 0 10px 30px -15px rgba(2, 12, 27, 0.7);
}

/* ===== Base Styles ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--dark-bg);
  color: var(--text-primary);
  font-family: var(--font-secondary);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-primary);
  font-weight: 700;
  line-height: 1.1;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

img {
  max-width: 100%;
  height: auto;
}

section {
  position: relative;
  padding: var(--section-padding) 5%;
}

/* ===== Particle Background ===== */
.particle-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background-color: var(--dark-bg);
  background-image: radial-gradient(circle at 50% 50%, 
    rgba(100, 255, 218, 0.05) 1px, 
    transparent 1px);
  background-size: 20px 20px;
}

.planet-layer img {
  position: absolute;
  width: 100px;
  opacity: 0;
  transition: opacity 1s ease;
  filter: drop-shadow(0 0 10px rgba(100,255,218,0.5));
}


/* ===== Navigation ===== */
.glass-nav {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: rgba(10, 25, 47, 0.9);
  backdrop-filter: blur(10px);
  z-index: 100;
  padding: 20px 5%;
  box-shadow: 0 10px 30px -10px rgba(2, 12, 27, 0.7);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--container-width);
  margin: 0 auto;
}

.logo {
  font-family: var(--font-primary);
  color: var(--accent);
}

.logo img {
  filter: brightness(0) invert(1);
  /* 
     brightness(0) makes it black 
     invert(1) flips black to white
  */
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 0.5rem 0;
  position: relative;
}

.nav-links a span {
  color: var(--accent);
  margin-right: 5px;
}

.nav-links a:hover {
  color: var(--accent);
}

.nav-links a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--accent);
  transition: var(--transition);
}

.nav-links a:hover::after {
  width: 100%;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 101;
}

.hamburger {
  width: 24px;
  height: 2px;
  background-color: var(--accent);
  position: relative;
  transition: var(--transition);
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 2px;
  background-color: var(--accent);
  transition: var(--transition);
}

.hamburger::before {
  top: -8px;
}

.hamburger::after {
  top: 8px;
}

.menu-toggle.active .hamburger {
  background-color: transparent;
}

.menu-toggle.active .hamburger::before {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active .hamburger::after {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== Hero Section ===== */
.hero {
  display: flex;
  align-items: center;
  min-height: 100vh;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 5%;
  gap: 3rem;
}

.hero-content {
  flex: 1;
  max-width: 600px;
}


.intro {
  color: var(--accent);
  font-size: 1.25rem;
  margin-bottom: 1rem;
  font-weight: 400;
}

.name {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.tagline {
  font-size: clamp(1.0rem, 4vw, 1.5rem);
  color: var(--text-primary);
  margin-bottom: 1.5rem;
}
.var {
  color: rgb(255, 255, 255); /* Classic IDE blue for variables */
}
.tag2 {
  font-family: 'Courier New', monospace;
  background: rgba(179, 198, 255, 0.05);
  padding: 1rem;
  border-radius: 4px;
  display: inline-block;
}

.blinking-cursor {
  display: inline-block;
  width: 10px;
  height: 1.2em;
  background: #64ffda;
  vertical-align: middle;
  margin-left: 3px;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  from, to { background: transparent }
  50% { background: var(--text-primary) }
}

.kw{
  color: var(--text-secondary)
}

.colorn {
  color: var(--text-secondary);
}
.colorn2 {
  color: var(--text-secondary); /* Classic IDE string orange */
}
.sp {
  font-weight: bolder;
  color: #FA5053;
}

.sp2 {
  font-weight: bolder;
  color:#97dd7d;
}

.colorstr {
  color: #FA5053; /* Classic IDE string orange */
}
.colormat {
  color: #97dd7d; /* Classic IDE string orange */
}

.indent {
  padding-left: 3.25ch; /* perfect Python indentation */
}

.description {
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  font-size: 1.1rem;
  line-height: 1.7;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  background-color: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 4px;
  padding: 1rem 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  transition: var(--transition);
}

.cta-button:hover {
  background-color: var(--accent-light);
  transform: translateY(-3px);
}

.arrow-icon {
  display: flex;
  align-items: center;
}

.arrow-line {
  width: 20px;
  height: 1px;
  background-color: var(--accent);
  position: relative;
}

.arrow-head {
  width: 8px;
  height: 8px;
  border-right: 1px solid var(--accent);
  border-bottom: 1px solid var(--accent);
  transform: rotate(-45deg);
  position: relative;
  right: 4px;
}

.hero-visual {
  flex: 1;
  position: relative;
  max-width: 500px;
}

.gradient-circle {
  position: absolute;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, var(--accent-light) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(30px);
  z-index: -1;
}

.profile-pic-container {
  display: flex;
  justify-content: center;
  margin: 0 auto;
}

.circular-image {
  width: 400px;
  height: 400px;
  object-fit: cover;
  object-position: 50% 10%;
  border-radius: 50%;
  border: 3px solid transparent;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(100, 255, 218, 0.3);
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}

.circular-image:hover {
  border-color: #64ffda;
}

.profile-pic-container2 {
  display: flex;
  justify-content: center;
  margin: 0 auto;
}

.circular-image2 {
  width: 400px;
  height: 400px;
  object-fit: cover;
  object-position: 50% 10%;
  border-radius: 50%;
  border: 3px solid transparent;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(100, 255, 218, 0.3);
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ===== About Section ===== */
.section-header {
  display: flex;
  align-items: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  font-size: 2rem;
  color: var(--text-primary);
  white-space: nowrap;
}

.section-header span {
  color: var(--accent);
  margin-right: 1rem;
  font-family: var(--font-secondary);
}

.divider {
  height: 1px;
  background-color: var(--lightest-bg);
  margin-left: 1rem;
  width: 100%;
  max-width: 300px;
}

.about-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 3rem;
  align-items: center;
}

.about-text p {
  margin-bottom: 1.5rem;
  color: var(--text-primary);
  line-height: 1.7;
}
.ptitle {
  font-size: 1.05rem;
  color: var(--text-primary);
  font-family: var(--font-primary);
}

.skills-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(140px, 200px));
  gap: 0.5rem;
  list-style: none;
  margin-top: 1.5rem;
}

.skills-list li {
  position: relative;
  padding-left: 1.5rem;
  color: var(--text-secondary);
  font-size: 0.9  rem;
}

.skills-list li::before {
  content: '->';
  position: absolute;
  left: 0;
  color: var(--accent);
}

.about-image {
  position: relative;
}

.image-frame {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--box-shadow);
}

.image-frame img {
  display: block;
  width: 100%;
  height: auto;
}

.frame-decoration {
  position: absolute;
  top: 20px;
  left: 20px;
  width: 100%;
  height: 100%;
  border: 2px solid var(--accent);
  border-radius: 10px;
  z-index: -1;
  transition: var(--transition);
}

.image-frame:hover ~ .frame-decoration {
  top: 15px;
  left: 15px;
}

/* ===== Projects Section ===== */
.projects-container {
  display: flex;
  flex-direction: column;
  gap: 6rem;
}

.project-card {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 2rem;
  align-items: center;
}

.project-card.reversed .project-media {
  grid-column: 1 / 8;
  grid-row: 1;
}

.project-card.reversed .project-info {
  grid-column: 7 / -1;
  text-align: right;
}

.project-card.reversed .project-links {
  justify-content: flex-end;
}

.project-card.reversed .tech-tags {
  justify-content: flex-end;
}

.project-media {
  position: relative;
  grid-column: 6 / -1;
  grid-row: 1;
  z-index: 1;
}

.media-container {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
}

.media-container:hover {
  transform: translateY(-5px);
}

.project-gif {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.media-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(10, 25, 47, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
}

.media-container:hover .media-overlay {
  opacity: 1;
}

.view-button {
  background-color: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 0.8rem 1.5rem;
  border-radius: 4px;
  font-size: 0.9rem;
  transition: var(--transition);
}

.view-button:hover {
  background-color: var(--accent-light);
}

.project-info {
  grid-column: 1 / 8;
  grid-row: 1;
  z-index: 2;
}

.project-info h3 {
  color: var(--text-primary);
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.project-description {
  background-color: var(--light-bg);
  padding: 1.5rem;
  border-radius: 4px;
  margin-bottom: 1.5rem;
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 0.95rem;
  box-shadow: var(--box-shadow);
}

.tech-tags {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.tech-tags li {
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-family: var(--font-primary);
}

.project-links {
  display: flex;
  gap: 1.5rem;
}

.project-links a {
  color: var(--text-primary);
  font-size: 1.2rem;
  transition: var(--transition);
}

.project-links a:hover {
  color: var(--accent);
  transform: translateY(-3px);
}

/* ===== Contact Section ===== */
.contact-container {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.contact-container h4 {
  color: var(--accent);
  font-size: 1rem;
  margin-bottom: 1rem;
}

.contact-container h2 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

.contact-container p {
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

.contact-button {
  display: inline-block;
  background-color: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 4px;
  padding: 1rem 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  transition: var(--transition);
  margin-bottom: 3rem;
}

.contact-button:hover {
  background-color: var(--accent-light);
  transform: translateY(-3px);
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
}

.social-links a {
  color: var(--text-primary);
  font-size: 1.2rem;
  transition: var(--transition);
}

.social-links a:hover {
  color: var(--accent);
  transform: translateY(-3px);
}

/* ===== Footer ===== */
footer {
  text-align: center;
  padding: 2rem 5%;
  background-color: var(--dark-bg);
}

.footer-content p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

/* ===== Responsive Design ===== */

@media (max-width: 1024px) {
  .hero {
    flex-direction: column;
    padding-top: 100px;
    text-align: center;
  }
  
  .hero-content {
    max-width: 100%;
  }
  
  .cta-button {
    margin: 0 auto;
  }
  
  .about-grid {
    grid-template-columns: 1fr;
  }
  
  .about-image {
    margin-top: 3rem;
  }
  
  .project-card,
  .project-card.reversed {
    grid-template-columns: 1fr;
  }
  
  .project-media,
  .project-card.reversed .project-media,
  .project-info,
  .project-card.reversed .project-info {
    grid-column: 1 / -1;
  }
  
  .project-info,
  .project-card.reversed .project-info {
    text-align: left;
  }
  
  .project-card.reversed .project-links,
  .project-card.reversed .tech-tags {
    justify-content: flex-start;
  }
  .project-card .project-info {
    background-color: rgba(10, 25, 47, 0.9); /* Solid background for readability */
    padding: 1.5rem;
    margin: 1rem;
    border-radius: 8px;
    box-shadow: var(--box-shadow);
  }

  .project-media {
    position: relative;
    z-index: 1;
  }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    height: 100vh;
    background-color: var(--light-bg);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    transition: var(--transition);
  }
  
  .nav-links.active {
    right: 0;
  }
  
  .menu-toggle {
    display: block;
  }
  
  .section {
    padding: 80px 5%;
  }
  
  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .divider {
    margin-left: 0;
    margin-top: 1rem;
    width: 100px;
  }
  .project-card, 
  .project-card.reversed {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
  }

  .project-info {
    order: 2; /* Force description below media */
    text-align: left !important; /* Override reversed alignment */
    background-color: var(--light-bg);
    padding: 1.5rem;
    margin-top: -3rem; /* Slight overlap for visual connection */
    position: relative;
    z-index: 2;
  }

  .project-media {
    order: 1;
  }

  .project-card.reversed .project-links,
  .project-card.reversed .tech-tags {
    justify-content: flex-start !important;
  }

  .media-overlay {
    display: none; /* Hide overlay since we're stacking elements */
  }
}

@media (max-width: 480px) {
  .hero {
    padding-top: 80px;
  }
  
  .name {
    font-size: 2.5rem;
  }
  
  .tagline {
    font-size: 1.5rem;
  }
  
  .skills-list {
    grid-template-columns: 1fr;
  }
  
  .social-links {
    gap: 1.5rem;
  }
}

/* ===== Mobile Responsiveness Fixes ===== */
@media (max-width: 768px) {
  /* Prevent horizontal overflow */
  html, body {
    width: 100%;
    overflow-x: hidden;
  }
  
  /* Adjust hero section spacing */
  .hero {
    padding-top: 120px;
    min-height: auto;
  }
  
  /* Make circular images smaller on mobile */
  .circular-image, 
  .circular-image2 {
    width: 250px;
    height: 250px;
  }
  
  /* Improve navigation menu */
  .nav-links {
    width: 80%;
    padding: 2rem;
  }
  
  .nav-links a {
    font-size: 1.1rem;
    padding: 0.75rem 0;
  }
  
  /* Make code block scrollable */
  .tag2 {
    overflow-x: auto;
    white-space: normal;
    max-width: 200%;
    display: block;
    font-size: 0.7rem; /* Slightly smaller on very small screens */
    padding: 1rem; /* Tighter padding */
    text-align: left; /* Removes centering */
    margin-left: 0;   /* Removes any auto-centering margins */
    margin-right: auto; /* Ensures left alignment */
    width: fit-content; /* Shrinks to content width */
  }

}

@media (max-width: 480px) {
  /* Ensure headers wrap properly */
  .section-header h2 {
    white-space: normal;
  }
  
  /* Adjust main heading sizes */
  .name {
    font-size: 2.3rem;
  }
  
  .tagline {
    font-size: 1.3rem;
  }
}