/* ================= ROOT THEME ================= */
:root{
  --primary:#5b5cf6;
  --bg:#f6f7fb;
  --text:#222;
  --card:#fff;
}

body.dark{
  --bg:#0f172a;
  --text:#f1f5f9;
  --card:#1e293b;
}

/* ================= GLOBAL ================= */
*{
  margin:0;
  padding:0;
  box-sizing:border-box;
  font-family:'Segoe UI',sans-serif;
}

body{
  background:var(--bg);
  color:var(--text);
  transition:.4s;
}
/* ================= GLOBAL BACKGROUND ================= */
body{
  background:
    linear-gradient(rgba(255,255,255,0.15), rgba(255,255,255,0.15)),
    url("images/ab.avif") center/cover no-repeat fixed;
  color: var(--text);
  transition: .4s;
}

body.dark{
  background:
    linear-gradient(rgba(2,6,23,0.9), rgba(2,6,23,0.9)),
    url("images/ab.avif") center/cover no-repeat fixed;
}



/* ================= HEADER ================= */
.header{
  position:sticky;
  top:0;
  z-index:1000;
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:15px 50px;
  background:#fff;
  box-shadow:0 5px 20px rgba(0,0,0,.05);
}

body.dark .header{
  background:#020617;
}
.logo{
  font-size:22px;
  font-weight:800;
  color:var(--primary);
}

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

.nav a{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:4px;
  text-decoration:none;
  color:var(--text);
  font-size:14px;
  padding:6px 10px;
  border-radius:12px;
  transition:0.3s;
}

.nav a img{
  width:22px;
  height:22px;
}

/* Hover effect */
.nav a:hover{
  background:rgba(91,92,246,0.15);
}

/* Dark mode */
body.dark .nav a img{
  filter:invert(1);
}

.mode-toggle{
  border:none;
  background:none;
  font-size:18px;
  cursor:pointer;
}

/* ================= HERO ================= */
.hero{
  min-height:100vh;
  padding:80px 50px;
  display:flex;
  align-items:center;
  justify-content:space-between;
}
/* ================= ABOUT BACKGROUND ================= */

#about{
  padding: 80px 8%;
  background: url("images/ab.avif") center/cover no-repeat;
  border-radius: 30px;
}

/* dark mode */
body.dark #about{
  background:
    linear-gradient(rgba(2,6,23,0.85), rgba(2,6,23,0.85)),
    url("images/ab.avif") center/cover no-repeat;
}

.hero h1{font-size:48px}

.hero h1 span{
  color: var(--text);          
  transition: color 0.3s ease;
}

.hero-image img{
  width:350px;
  height:350px;
  border-radius:50%;
  border:4px solid black;
}
/* ================= MOVING JOURNEY TITLE ================= */
.journey-relay {
  position: relative;
  width: 100%;
  height: 50px;
  overflow: hidden;
  margin-bottom: 40px;
}
#journey .title{
  color: #000000;
}

/* Dark mode – PURPLE */
body.dark #journey .title{
  color: #a5b4fc;
}
.journey-text{
  position:absolute;
  left:-100%;
  font-size:32px;
  font-weight:700;
  color: var(--text);     /* 🔥 FIX */
  white-space:nowrap;
  animation: moveRelay 10s linear infinite;
}


/* second text starts AFTER first ends */
.journey-text.t2 {
  animation-delay: 5s;
}

/* movement */
@keyframes moveRelay {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(200vw);
  }
}

/* dark mode glow */
body.dark .journey-text {
  text-shadow: 0 0 12px rgba(91,92,246,0.6);
}

/* ================= Journey================= */
.journey {
  padding: 80px 10%;
  background: linear-gradient(135deg, #f6f7fb, #eef2ff);
  text-align: center;
}
body.dark .journey{
  background: linear-gradient(135deg,#020617,#0f172a);
}


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

.journey-slider {
  position: relative;
  max-width: 900px;
  margin: auto;
}

.slide-container {
  overflow: hidden;
}

.slide {
  display: none;
  align-items: center;
  gap: 30px;
  background: white;
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 15px 40px rgba(0,0,0,0.1);
  animation: fade 0.6s ease;
}

.slide.active {
  display: flex;
}

.slide img {
  width: 260px;
  height: 260px;
  border-radius: 18px;
  object-fit: cover;        
  object-position: top;     
  background: #f6f7fb;
}

.slide-content {
  text-align: left;
}

.slide-content h3 {
  font-size: 26px;
  color: #5b5cf6;
  margin-bottom: 10px;
}

.slide-content p {
  font-size: 15px;
  margin: 6px 0;
}

.nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: #5b5cf6;
  color: white;
  border: none;
  font-size: 22px;
  padding: 12px 18px;
  border-radius: 50%;
  cursor: pointer;
  transition: 0.3s;
}

.nav-btn:hover {
  background: #3f41e0;
}

.nav-btn.left { left: -10px; }
.nav-btn.right { right: -10px; }

@keyframes fade {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* Responsive */
@media(max-width: 768px) {
  .slide {
    flex-direction: column;
    text-align: center;
  }

  .slide-content {
    text-align: center;
  }
}
/* ===== JOURNEY DARK MODE TEXT VISIBILITY ===== */

body.dark .slide{
  background: #020617;
}

body.dark .slide-content h3{
  color: #a5b4fc;
}

body.dark .slide-content p{
  color: #e5e7eb;
}

body.dark .journey .section-title{
  color: #f8fafc;
}


/* ================= FACTS & BUTTONS ================= */
.facts{
  display:flex;
  gap:10px;
  margin:25px 0;
}

.fact{
  background:var(--card);
  padding:10px 15px;
  border-radius:20px;
}

.buttons{
  display:flex;
  gap:15px;
}

.btn{
  padding:12px 25px;
  border-radius:30px;
  text-decoration:none;
}

.primary{
  background:var(--primary);
  color:#fff;
}

.secondary{
  border:2px solid var(--primary);
  color:var(--primary);
}

/* ================= SECTIONS ================= */
.section{
  padding:80px 50px;
  text-align:center;
}

.title{
  font-size:36px;
  margin-bottom:40px;
}

/* Light mode – BLACK */
#achievements .title{
  color: #000000;
}

/* Dark mode – PURPLE */
body.dark #achievements .title{
  color: #a5b4fc;
}

/* ================= SKILLS ================= */

/* Light mode – BLACK */
#skills .title{
  color: #000000;
}

/* Dark mode – PURPLE */
body.dark #skills .title{
  color: #a5b4fc;
}

.skills-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
  gap:20px;
}

.skills-grid div{
  background:var(--card);
  padding:20px;
  border-radius:15px;
  color: var(--text);
}

body.dark .skills-grid div{
  background: rgba(30,41,59,0.85);
}

/* ================= PROJECTS ================= */
#projects{
  padding: 80px 8%;
  background: url("images/p.jpeg") center/cover no-repeat;
  border-radius: 30px;
}

/* dark mode */
body.dark #projects{
  background:
    linear-gradient(rgba(2,6,23,0.85), rgba(2,6,23,0.85)),
    url("images/p.jpeg") center/cover no-repeat;
}

.projects-title{
  width: 100%;
  text-align: center;
  font-size: 42px;
  font-weight: 700;
  margin-bottom: 60px;
}
#projects .title{
  color: #000000;
}

/* Dark mode – PURPLE */
body.dark projects .title{
  color: #a5b4fc;
}
.project-row {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 50px;
  align-items: center;
  padding: 50px 0;
  border-bottom: 1px solid #e5e7eb;
}

.project-content h3 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 12px;
}

.project-content p {
  font-size: 15px;
  line-height: 1.7;
  color: black;
}

.project-media video {
  width: 100%;
  border-radius: 14px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.12);
  transform: scale(1);
  transition: transform 0.5s ease;
}

/* Hover animation */
.project-row:hover video {
  transform: scale(1.05);
}

/* Dark mode support */
body.dark .project-content p {
  color: #d1d5db;
}

body.dark .project-row {
  border-color: #334155;
}

/* Command Drive Warrior – Tech / Robotics */
.project-robot {
  background:
    linear-gradient(rgba(255,255,255,0.85), rgba(255,255,255,0.85)),
    url("images/robotic-bg.avif") center/cover no-repeat;
  border-radius: 24px;
  padding: 60px;
}

/* AI Smart Agro – Agriculture */
.project-agro {
  background:
    linear-gradient(rgba(255,255,255,0.85), rgba(255,255,255,0.85)),
    url("images/agro-bg.avif") center/cover no-repeat;
  border-radius: 24px;
  padding: 60px;
}
body.dark .project-agro {
  background:
    linear-gradient(rgba(2,6,23,0.9), rgba(2,6,23,0.9)),
    inherit;
}
/* ===== ACHIEVEMENTS ===== */

.achievements-row {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 30px;
  margin-top: 40px;
}

.achievement-card {
  width: 320px;
  background: var(--card);
  padding: 20px;
  border-radius: 18px;
  text-align: center;
  box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.achievement-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;   
  border-radius: 14px;
  margin-bottom: 12px;
}

.achievement-card h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.cert-link {
  color: #5b5cf6;
  font-weight: 600;
  text-decoration: none;
}

.cert-link:hover {
  text-decoration: underline;
}

/* Dark mode */
body.dark .achievement-card {
  background: #1e293b;
}

body.dark .cert-link {
  color: #a5b4fc;
}


/* ==================== HOBBIES ====================== */
.hobbies-title-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 40px;
}

/* Title styling */
.shaky-title {
  font-size: 36px;
  font-weight: 700;
  color: black;
  animation: shakeLR 1s infinite;
}

/* LEFT–RIGHT SHAKE ONLY (NO UP/DOWN) */
@keyframes shakeLR {
  0%   { transform: translateX(0); }
  25%  { transform: translateX(-3px); }
  50%  { transform: translateX(3px); }
  75%  { transform: translateX(-3px); }
  100% { transform: translateX(0); }
}

/* Dark mode */
body.dark .shaky-title {
  color: #a5b4fc;
}

/* ================= TIMELINE ================= */
.timeline li{
  list-style:none;
  margin:15px 0;
  font-size:18px;
}

/* ================= GALLERY ================= */
.gallery-grid{
  columns:3;
  column-gap:20px;
}

.gallery-grid img{
  width:100%;
  height: 400px;
  margin-bottom:20px;
  border-radius:15px;
  cursor:pointer;
  transition:.4s;
}

.gallery-grid img:hover{
  transform:scale(1.07);
}

/* ================= CONTACT FOOTER ================= */
.contact-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
  padding: 30px 10px;
  border-top: 1px solid #e5e7eb;
  margin-top: 80px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 600;
  color: #5b5cf6;
  font-size: 16px;
}

.contact-item img {
  width: 24px;
  height: 24px;
}

.contact-item:hover {
  text-decoration: underline;
}

/* Dark mode */
body.dark .contact-footer {
  border-color: #334155;
}

body.dark .contact-item {
  color: #a5b4fc;
}

/* Mobile */
@media (max-width: 600px) {
  .contact-footer {
    flex-wrap: wrap;
    gap: 20px;
  }
}


/* ================= LIGHTBOX ================= */
#lightbox{
  position:fixed;
  inset:0;
  display:none;
  justify-content:center;
  align-items:center;
  background:rgba(0,0,0,.8);
  z-index:2000;
}

#lightbox img{
  max-width:80%;
  border-radius:20px;
}

/* ================= FLOATING DOT ================= */
.floating-dot{
  width:10px;
  height:10px;
  border-radius:50%;
  position:absolute;
  background:rgba(99,102,241,.3);
}

body.dark .floating-dot{
  background:#fff;
  box-shadow:0 0 6px #fff,0 0 12px rgba(255,255,255,.8);
}

/* ================= SHAPES ================= */
.shape{
  position:fixed;
  width:80px;
  height:80px;
  border-radius:50%;
  background:rgba(91,92,246,.2);
  animation:float 6s infinite ease-in-out;
}

.s1{top:20%;left:10%}
.s2{top:60%;left:80%}
.s3{top:40%;left:50%}

@keyframes float{
  0%{transform:translateY(0)}
  50%{transform:translateY(-30px)}
  100%{transform:translateY(0)}
}

/* ================= ANIMATION ================= */
.fade{
  opacity:0;
  transform:translateY(40px);
  transition:1s;
}

.fade.show{
  opacity:1;
  transform:translateY(0);
}
/* ================= MOBILE VIEW ONLY (DO NOT AFFECT DESKTOP) ================= */
@media (max-width: 768px) {

  /* REMOVE SIDE GAP */
  html, body {
    width: 100%;
    overflow-x: hidden;
  }

  /* ================= HEADER ================= */
  .header {
    flex-direction: column;
    align-items: center;
    padding: 12px 10px;
    width: 100%;
    position: relative;
  }

  /* NAME CENTER */
  .logo {
    width: 100%;
    text-align: center;
    font-size: 20px;
    margin-bottom: 10px;
  }

  /* TOGGLE BUTTON TOP RIGHT */
  #mode-toggle {
    position: absolute;
    top: 10px;
    right: 12px;
    font-size: 18px;
  }

  /* NAVIGATION BELOW NAME */
  .nav {
    width: 100%;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
  }

  .nav a {
    padding: 6px 8px;
    font-size: 13px;
  }

  /* ================= HERO SECTION ================= */
  .hero {
    flex-direction: column;
    text-align: center;
    padding: 50px 16px;
  }

  .hero-text,
  .hero-image {
    width: 100%;
  }

  .hero-image {
    display: flex;
    justify-content: center;
  }

  .hero-image img {
    width: 260px;
    height: 260px;
  }

  .facts {
    justify-content: center;
    flex-wrap: wrap;
  }

  .buttons {
    justify-content: center;
    flex-wrap: wrap;
  }

  /* ================= PROJECTS ================= */
  .project-row {
    grid-template-columns: 1fr;
    gap: 25px;
    padding: 30px 0;
  }

  /* ================= ACHIEVEMENTS (1 PER ROW) ================= */
  .achievements-row {
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }

  .achievement-card {
    width: 100%;
    max-width: 320px;
  }

  /* ================= CONTACT (2 PER ROW) ================= */
  .contact-footer {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    padding: 30px 16px;
    text-align: center;
  }

  .contact-item {
    justify-content: center;
    font-size: 15px;
  }

  /* ================= GALLERY ================= */
  .gallery-grid {
    columns: 1;
    padding: 0 16px;
  }
}
