/* ===== RESET & BASE ===== */
*{margin:0;padding:0;box-sizing:border-box;scroll-behavior:smooth;}
body{
  font-family:'Poppins',sans-serif;
  background:linear-gradient(120deg,#01010a,#060b2b,#1a074b);
  color:#fff;
  overflow-x:hidden;
  transition:background 0.6s,color 0.6s;
}

/* ===== THREE-LAYER HEADER ===== */
header{
  position:fixed;
  top:0;left:0;width:100%;
  z-index:1000;
  transition:top 0.4s;
  font-size:0.95rem;
}

/* --- Layer 1: Contact & Socials --- */
.header-top{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:0.4rem 2rem;
  background:rgba(0,0,0,0.6);
  backdrop-filter:blur(8px);
  color:#e0e0e0;
}
.header-top a{
  color:#00aaff;
  text-decoration:none;
  margin-left:1rem;
  font-weight:500;
}
.header-top a:hover{color:#fff;}
.contact-info span{margin-right:1rem;}

/* --- Layer 2: Utility Bar --- */
.header-utility{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:0.5rem 2rem;
  background:rgba(0,0,30,0.6);
  backdrop-filter:blur(8px);
}
.language-select{
  background:transparent;
  color:#fff;
  border:1px solid rgba(0,170,255,0.5);
  padding:0.3rem 0.5rem;
  border-radius:6px;
  outline:none;
}
.availability span{color:#00ff99;}
.utility-right{
  display:flex;
  align-items:center;
  gap:1rem;
}
.theme-toggle{
  width:40px;height:20px;background:#222;border-radius:20px;
  display:flex;align-items:center;padding:2px;cursor:pointer;
  transition:background 0.3s;
}
.theme-toggle.active{background:#ddd;}
.toggle-circle{
  width:16px;height:16px;border-radius:50%;background:#fff;
  transition:transform 0.3s;
}
.theme-toggle.active .toggle-circle{
  transform:translateX(20px);
  background:#333;
}

/* --- Layer 3: Main Nav --- */
.header-main{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:0.7rem 2rem;
  background:rgba(0,0,0,0.75);
  backdrop-filter:blur(8px);
}
.logo{
  font-size:1.6rem;font-weight:700;color:#00aaff;
}
.logo span{color:#a259ff;}
nav{
  display:flex;gap:1.5rem;
}
nav a{
  text-decoration:none;
  color:#fff;
  transition:color 0.3s;
}
nav a:hover{color:#00aaff;}
.cv-btn{
  background:#00aaff;
  color:#fff;
  text-decoration:none;
  padding:0.5rem 1rem;
  border-radius:25px;
  font-weight:500;
  transition:background 0.3s;
}
.cv-btn:hover{background:#0077cc;}
.menu-toggle{
  display:none;
  font-size:1.8rem;
  cursor:pointer;
}

/* --- Light Theme Versions --- */
body.light-theme .header-top,
body.light-theme .header-utility,
body.light-theme .header-main{
  background:rgba(255,255,255,0.8);
  color:#111;
}
body.light-theme .header-top a,
body.light-theme nav a{color:#111;}
body.light-theme .cv-btn{background:#0077cc;}
body.light-theme .language-select{
  color:#111;border:1px solid rgba(0,0,0,0.2);
}

/* --- Responsive Nav --- */
@media(max-width:900px){
  .header-top, .header-utility{display:none;} /* hide top layers on mobile */
  .header-main{
    flex-wrap:wrap;
    justify-content:space-between;
  }
  nav{
    position:absolute;
    top:60px;right:0;
    background:rgba(0,0,0,0.95);
    flex-direction:column;
    width:200px;
    max-height:0;
    overflow:hidden;
    border-radius:10px;
    transition:max-height 0.4s ease;
  }
  nav.active{max-height:400px;}
  nav a{padding:1rem;}
  .menu-toggle{display:block;}
}

/* ===== HERO SECTION ===== */
.hero{
  height:100vh;position:relative;
  display:flex;align-items:center;justify-content:center;
  background:#000;overflow:hidden;
}
#code-canvas{
  position:absolute;top:0;left:0;width:100%;height:100%;z-index:0;
}
.hero-overlay{
  position:absolute;inset:0;
  background:radial-gradient(circle at 30% 50%,rgba(0,0,30,0.4),rgba(0,0,0,0.9));
  z-index:1;
}
.hero-content{
  position:relative;z-index:2;
  display:flex;align-items:center;justify-content:space-between;
  width:90%;max-width:1200px;gap:2rem;
}
.hero-left h1{font-size:2.4rem;margin-bottom:0.5rem;}
.hero-left h1 span{color:#00aaff;}
.hero-left h2{color:#a259ff;margin-bottom:1rem;transition:opacity 0.5s;}
.hero-left p{margin-bottom:1.5rem;max-width:500px;line-height:1.6;}
.btn{
  display:inline-block;padding:0.8rem 1.5rem;background:#00aaff;
  color:#fff;border-radius:30px;text-decoration:none;transition:background 0.3s;
}
.btn:hover{background:#0077cc;}

/* ===== HERO IMAGE CARD ===== */
.hero-right{
  display:flex;justify-content:center;align-items:center;
}
.image-card{
  position:relative;
  width:340px;height:400px;
  background:rgba(255,255,255,0.05);
  border-radius:20px;
  box-shadow:0 0 30px rgba(0,170,255,0.2);
  overflow:hidden;
  transition:transform 0.6s ease,box-shadow 0.6s ease;
  backdrop-filter:blur(10px);
}
.image-card::before{
  content:"";
  position:absolute;inset:0;
  border-radius:20px;
  border:1px solid rgba(0,170,255,0.5);
  box-shadow:inset 0 0 30px rgba(0,170,255,0.1);
  pointer-events:none;
}
.hero-photo{
  width:100%;height:100%;
  object-fit:contain;
  border-radius:20px;
  filter:brightness(1.1);
  transition:transform 0.5s ease,filter 0.5s ease;
}
.image-card:hover{
  transform:translateY(-10px);
  box-shadow:0 0 50px rgba(0,170,255,0.4);
}
.image-card:hover .hero-photo{
  transform:scale(1.03);
  filter:brightness(1.2);
}

/* ===== ABOUT ME SCROLL (VISIBLE + MANUAL) ===== */
.about {
  position: relative;
  height: 100vh;
  overflow: hidden;
  background: radial-gradient(circle at center, #02021b 0%, #01010a 90%);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.about h2 {
  font-size: 2rem;
  color: #00aaff;
  margin-bottom: 1.5rem;
  z-index: 2;
  text-shadow: 0 0 10px #00aaff;
}

.about-scroll {
  position: relative;
  width: 80%;
  max-width: 800px;
  height: 70vh;
  overflow-y: auto;
  padding-right: 10px;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: #00aaff rgba(255,255,255,0.1);
  border: 1px solid rgba(0,170,255,0.3);
  border-radius: 10px;
  background: rgba(0,0,30,0.3);
}

/* Scrollbar styling for Chrome */
.about-scroll::-webkit-scrollbar {
  width: 6px;
}
.about-scroll::-webkit-scrollbar-thumb {
  background: #00aaff;
  border-radius: 10px;
}
.about-scroll::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.05);
}

.scroll-content {
  position: relative;
  color: #e0e0e0;
  line-height: 1.8;
  font-size: 1.05rem;
  padding: 1rem 0;
  text-align: justify;
}
.scroll-content p {
  margin-bottom: 1.8rem;
  text-shadow: 0 0 6px rgba(0,170,255,0.2);
}

/* Light Theme */
body.light-theme .about {
  background: linear-gradient(120deg, #f2f2f2, #eaeaea);
  color: #111;
}
body.light-theme .about h2 {
  color: #0077cc;
  text-shadow: none;
}
body.light-theme .scroll-content p {
  color: #222;
  text-shadow: none;
}


/* ===== SCROLLING SKILLS ===== */
.skills {
  position: relative;
  padding: 5rem 2rem;
  overflow: hidden;
  background: radial-gradient(circle at center, #02021b 0%, #01010a 90%);
  text-align: center;
}

.skills h2 {
  font-size: 2rem;
  color: #00aaff;
  margin-bottom: 2rem;
  text-shadow: 0 0 10px #00aaff;
}

.skills-wrapper {
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.skills-scroll {
  display: inline-flex;
  gap: 2.5rem;
  animation: scrollLeft 30s linear infinite;
}

.skills-scroll span {
  font-size: 1.2rem;
  letter-spacing: 1px;
  color: #e0e0e0;
  background: rgba(255,255,255,0.05);
  padding: 0.7rem 1.4rem;
  border-radius: 30px;
  border: 1px solid rgba(0,170,255,0.3);
  box-shadow: 0 0 15px rgba(0,170,255,0.1);
  transition: transform 0.3s, box-shadow 0.3s;
}

.skills-scroll span:hover {
  transform: scale(1.15);
  box-shadow: 0 0 20px rgba(0,170,255,0.4);
}

@keyframes scrollLeft {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* LIGHT THEME */
body.light-theme .skills {
  background: linear-gradient(120deg, #f5f5f5, #eaeaea);
}
body.light-theme .skills h2 {
  color: #0077cc;
  text-shadow: none;
}
body.light-theme .skills-scroll span {
  background: rgba(0,0,0,0.05);
  color: #222;
  border-color: rgba(0,0,0,0.1);
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .skills-scroll span {
    font-size: 1rem;
    padding: 0.5rem 1.1rem;
  }
}


/* ===== PROJECTS ===== */
.project-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(280px,1fr));
  gap:2rem;
  margin-top:2rem;
}
.project-card{
  background:rgba(255,255,255,0.05);
  padding:1rem;
  border-radius:10px;
  text-align:left;
}
.project-card img{
  width:100%;
  border-radius:10px;
  margin-bottom:1rem;
}

/* ===== EDITS ===== */
.scroll-container{
  display:flex;
  overflow-x:auto;
  scroll-behavior:smooth;
  gap:1rem;
  padding:1rem 0;
}
.scroll-container::-webkit-scrollbar{height:6px;}
.scroll-container::-webkit-scrollbar-thumb{background:#00aaff;border-radius:10px;}
.scroll-item video,.scroll-item img{
  width:300px;
  border-radius:10px;
}

/* ===== CONTACT ===== */
form{
  display:flex;
  flex-direction:column;
  max-width:500px;
  margin:auto;
  gap:1rem;
}
input,textarea{
  padding:0.8rem;
  border:none;
  border-radius:8px;
  outline:none;
}
textarea{resize:none;height:150px;}
button{cursor:pointer;border:none;}

/* ===== FOOTER ===== */
footer{text-align:center;padding:1rem;background:rgba(0,0,0,0.5);}

/* ===== LIGHT THEME ===== */
body.light-theme{background:#f5f5f5;color:#111;}
body.light-theme header{background:rgba(255,255,255,0.8);}
body.light-theme nav a{color:#111;}
body.light-theme .btn{background:#0077cc;}
body.light-theme .skill,body.light-theme .project-card{background:rgba(0,0,0,0.05);}
body.light-theme .scroll-container::-webkit-scrollbar-thumb{background:#0077cc;}
body.light-theme .about{background:linear-gradient(120deg,#f2f2f2,#eaeaea);}
body.light-theme .about h2{color:#0077cc;text-shadow:none;}
body.light-theme .scroll-content p{color:#222;text-shadow:none;}

/* ===== RESPONSIVE ===== */
@media(max-width:900px){
  nav{
    position:absolute;
    top:70px;right:0;
    background:rgba(0,0,0,0.95);
    flex-direction:column;
    width:200px;
    max-height:0;
    overflow:hidden;
    border-radius:10px;
    transition:max-height 0.4s ease;
  }
  nav.active{max-height:400px;}
  nav a{padding:1rem;}
  .menu-toggle{display:block;}
  .hero-content{flex-direction:column;text-align:center;}
  .image-card{width:250px;height:300px;}
  .about-scroll{width:90%;height:60vh;}
  .scroll-content p{font-size:0.95rem;}
}


/* ===== EDITS SECTION ===== */
.edits {
  position: relative;
  padding: 5rem 2rem;
  text-align: center;
  background: radial-gradient(circle at center, #02021b 0%, #01010a 90%);
}
.edits h2 {
  font-size: 2rem;
  color: #00aaff;
  margin-bottom: 1.5rem;
  text-shadow: 0 0 10px #00aaff;
}

/* Shared Scroll Layout */
.scroll-container {
  display: flex;
  overflow-x: auto;
  gap: 1.5rem;
  scroll-behavior: smooth;
  padding: 1rem 0 2rem;
  scrollbar-width: thin;
  scrollbar-color: #00aaff rgba(255,255,255,0.1);
}
.scroll-container::-webkit-scrollbar {
  height: 8px;
}
.scroll-container::-webkit-scrollbar-thumb {
  background: #00aaff;
  border-radius: 10px;
}
.scroll-container::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.05);
}

/* Scroll Item Cards */
.scroll-item {
  position: relative;
  flex: 0 0 auto;
  width: 320px;
  height: 200px;
  border-radius: 15px;
  overflow: hidden;
  background: rgba(255,255,255,0.05);
  box-shadow: 0 0 20px rgba(0,170,255,0.2);
  transition: transform 0.5s ease, box-shadow 0.5s ease;
}
.scroll-item:hover {
  transform: translateY(-8px) scale(1.03);
  box-shadow: 0 0 35px rgba(0,170,255,0.4);
}

/* Video & Image Styles */
.scroll-item video,
.scroll-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 15px;
  transition: opacity 0.4s ease;
}
.scroll-item:hover video,
.scroll-item:hover img {
  opacity: 0.9;
}

/* Section Separation */
.videos {
  margin-bottom: 4rem;
  border-bottom: 1px solid rgba(0,170,255,0.2);
  padding-bottom: 2rem;
}

/* Light Theme Adjustments */
body.light-theme .edits {
  background: linear-gradient(120deg, #f5f5f5, #eaeaea);
}
body.light-theme .edits h2 {
  color: #0077cc;
  text-shadow: none;
}
body.light-theme .scroll-item {
  background: rgba(0,0,0,0.05);
  box-shadow: 0 0 20px rgba(0,0,0,0.1);
}
body.light-theme .scroll-item:hover {
  box-shadow: 0 0 30px rgba(0,0,0,0.3);
}
body.light-theme .scroll-container::-webkit-scrollbar-thumb {
  background: #0077cc;
}

/* Responsive Design */
@media (max-width: 900px) {
  .scroll-item {
    width: 260px;
    height: 160px;
  }
  .edits h2 {
    font-size: 1.6rem;
  }
}


/* ===== FEATURED PROJECTS SECTION ===== */
.featured {
  padding: 5rem 2rem;
  text-align: center;
  background: radial-gradient(circle at center, #02021b 0%, #01010a 90%);
  overflow: hidden;
}
.featured h2 {
  font-size: 2rem;
  color: #00aaff;
  margin: 2rem 0 0.5rem;
  text-shadow: 0 0 10px #00aaff;
}
.featured-subtitle {
  color: #bbb;
  font-size: 1rem;
  margin-bottom: 2.5rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

/* Scrolling banner */
.learning-banner {
  overflow: hidden;
  white-space: nowrap;
  border-top: 1px solid rgba(0,170,255,0.3);
  border-bottom: 1px solid rgba(0,170,255,0.3);
  background: rgba(0,0,30,0.5);
  padding: 0.6rem 0;
  margin-bottom: 1.5rem;
}
.scroll-text {
  display: inline-block;
  padding-left: 100%;
  animation: scrollLeft 25s linear infinite;
  color: #00aaff;
  font-weight: 500;
  font-size: 1.05rem;
  letter-spacing: 0.5px;
}
@keyframes scrollLeft {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* Featured projects grid */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}
.featured-card {
  position: relative;
  background: rgba(255,255,255,0.05);
  border-radius: 15px;
  overflow: hidden;
  padding-bottom: 1rem;
  box-shadow: 0 0 20px rgba(0,170,255,0.2);
  transition: transform 0.5s ease, box-shadow 0.5s ease;
}
.featured-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 0 35px rgba(0,170,255,0.4);
}
.featured-card img,
.featured-card video {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 15px 15px 0 0;
}
.featured-card h3 {
  margin: 1rem 0 0.5rem;
  color: #00aaff;
  font-size: 1.2rem;
}
.featured-card p {
  font-size: 0.95rem;
  color: #ccc;
  padding: 0 1rem;
  line-height: 1.6;
}
.tag {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0,170,255,0.8);
  color: #fff;
  font-size: 0.8rem;
  padding: 0.3rem 0.7rem;
  border-radius: 5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Light Theme */
body.light-theme .featured {
  background: linear-gradient(120deg, #f5f5f5, #eaeaea);
}
body.light-theme .featured h2 {
  color: #0077cc;
  text-shadow: none;
}
body.light-theme .featured-card {
  background: rgba(0,0,0,0.05);
  box-shadow: 0 0 20px rgba(0,0,0,0.1);
}
body.light-theme .featured-card:hover {
  box-shadow: 0 0 30px rgba(0,0,0,0.3);
}
body.light-theme .learning-banner {
  background: rgba(255,255,255,0.8);
}
body.light-theme .scroll-text {
  color: #0077cc;
}

/* Responsive */
@media (max-width: 900px) {
  .scroll-text { font-size: 0.95rem; }
  .featured-card img, .featured-card video { height: 160px; }
  .featured-card h3 { font-size: 1rem; }
}

#chat-bubble {
  position: fixed;
  bottom: 25px;
  right: 25px;
  background: #00aaff;
  color: #fff;
  font-size: 1.5rem;
  border-radius: 50%;
  padding: 15px;
  cursor: pointer;
  box-shadow: 0 0 15px rgba(0,170,255,0.5);
  z-index: 2000;
}
#chat-window {
  position: fixed;
  bottom: 90px;
  right: 25px;
  width: 320px;
  height: 420px;
  background: rgba(0,0,30,0.9);
  color: #fff;
  border-radius: 12px;
  box-shadow: 0 0 25px rgba(0,170,255,0.3);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 2000;
}
#chat-window.hidden { display: none; }
#chat-header {
  background: #00aaff;
  padding: 0.8rem;
  font-weight: 600;
  text-align: center;
}
#chat-messages {
  flex: 1;
  padding: 0.8rem;
  overflow-y: auto;
  font-size: 0.9rem;
}
#chat-input {
  border: none;
  outline: none;
  padding: 0.7rem;
  background: rgba(255,255,255,0.1);
  color: #fff;
}
