:root {
  --bg-light:#ffffff;
  --bg-dark:#121212;
  --text-light:#000;
  --text-dark:#f5f5f5;
  --primary:#4f46e5;
}

body{
  margin:0;
  font-family:"Segoe UI",sans-serif;
  background:var(--bg-dark);
  color:var(--text-dark);
  transition:0.3s;
}

body.light-mode{
  background:var(--bg-light);
  color:var(--text-light);
}

a{
  text-decoration:none;
  color:inherit;
}


header{
  position:fixed;
  top:20px;
  left:50%;
  transform:translateX(-50%);
  width:85%;

  display:flex;
  justify-content:space-between;
  align-items:center;

  padding:12px 25px;
  border-radius:14px;

  backdrop-filter: blur(14px);
  background: rgba(20,20,25,0.55);
  border:1px solid rgba(255,255,255,0.08);

  box-shadow:0 10px 30px rgba(0,0,0,0.35);

  z-index:1000;
}

main{
  padding-top:140px;
}

.logo{
  font-size:1.4rem;
  font-weight:bold;
}

nav a,#toggle-mode{
  margin-left:1rem;
  background:none;
  border:none;
  cursor:pointer;
}

nav a{
  position:relative;
  transition:0.3s;
}

nav a::after{
  content:"";
  position:absolute;
  left:0;
  bottom:-4px;
  width:0%;
  height:2px;
  background:linear-gradient(90deg,#4f46e5,#14b8a6);
  transition:0.3s;
}

nav a:hover::after{
  width:100%;
}

nav a.active{
  font-weight:600;
}


.projects{
  text-align:center;
}

.projects h1{
  font-size:2.2rem;
}

.section-intro{
  max-width:600px;
  margin:15px auto 50px;
  opacity:0.75;
}

.projects h2,
.projects h3{
  margin:60px 0 25px;
}


.project-grid{
  max-width:1100px;
  margin:0 auto;
  display:grid;
  gap:40px;
}

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

.project-grid.mini-projects{
  grid-template-columns:repeat(3,minmax(250px,1fr));
}


.project-card{
  position:relative;
  padding:30px;
  border-radius:16px;

  backdrop-filter: blur(14px);
  background: rgba(20,20,25,0.55);
  border:1px solid rgba(255,255,255,0.08);

  box-shadow:0 10px 30px rgba(0,0,0,0.35);

  transition:0.3s;
  transform-style:preserve-3d;
}

.project-card:hover{
  transform:translateY(-6px);
  box-shadow:0 20px 40px rgba(0,0,0,0.4);
}

.project-card h4{
  margin-bottom:10px;
}

.project-card p{
  font-size:0.95rem;
  opacity:0.85;
}

.tech-stack{
  justify-content: center;
  margin-top:15px;
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.tech-stack span{
  font-size:0.75rem;
  padding:5px 10px;
  border-radius:10px;
  background:rgba(79,70,229,0.2);
}

.project-grid.main-projects .project-card:first-child::before{
  content:"★ Featured Project";
  position:absolute;
  top:12px;
  right:15px;
  font-size:0.7rem;
  padding:4px 8px;
  border-radius:12px;
  background:linear-gradient(90deg,#4f46e5,#14b8a6);
  color:white;
}


.reveal{
  opacity:0;
  transform:translateY(40px);
  transition:0.8s ease;
}

.reveal.active{
  opacity:1;
  transform:translateY(0);
}


body::before{
  content:"";
  position:fixed;
  top:-200px;
  left:-200px;
  width:600px;
  height:600px;

  background: radial-gradient(circle,
      rgba(79,70,229,0.35),
      transparent 70%);

  filter:blur(80px);
  z-index:-1;
}

body::after{
  content:"";
  position:fixed;
  bottom:-250px;
  right:-200px;
  width:600px;
  height:600px;

  background: radial-gradient(circle,
      rgba(20,184,166,0.35),
      transparent 70%);

  filter:blur(90px);
  z-index:-1;
}


.page-transition {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.page-transition.show {
  opacity: 1;
  transform: translateY(0);
}

.page-transition.fade-out {
  opacity: 0;
  transform: translateY(-20px);
}


footer{
  text-align:center;
  padding:2rem;
  color:gray;
}


@media (max-width:1100px){
  .project-grid.main-projects{
    grid-template-columns:1fr;
  }
  .project-grid.mini-projects{
    grid-template-columns:repeat(2,1fr);
  }
}

@media (max-width:768px){
  .project-grid.mini-projects{
    grid-template-columns:1fr;
  }
}

.section-schedule {
  margin: 72px 0 8px;
}