@import url('https://fonts.googleapis.com/css2?family=Ubuntu:ital,wght@0,300;0,400;0,500;0,700;1,300;1,400;1,500;1,700&display=swap');
      
/* --- GLOBAL RESET + SCROLL FIXES --- */
* {
  box-sizing: border-box;
}

html, body {
  overflow-x: hidden;
  overflow-y: auto;
  height: 100%;
  width: 100%;
}

body, section {
  pointer-events: auto;
}

img, video, canvas {
  max-width: 100%;
  height: auto;
  display: block;
}

:root {
  --bg: #921fac;
  --text: #212529;
  --heading: #111111;
  --link: #4ba2ff;
  --code-bg: #f1f3f5;
  --border: #cccccc;
  --dbrgradc: #cca4ff;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #3c0d46;
    --text: #e0e0e0;
    --heading: #ffffff;
    --link: #71a7ff;
    --code-bg: #1e1e1e;
    --border: #333333;
    --dbrgradc: #4e109e;
  }
}

body {
  font-family: 'Ubuntu', sans-serif;
  background-color: var(--bg);
  color: var(--text);
}

#sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 250px;
  height: 100vh;
  background: linear-gradient(-45deg, var(--dbrgradc), var(--bg));
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 20px;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
}

#sidebar img {
  width: 120px;
  height: auto;
  margin-bottom: 20px;
}

#sidebar a {
  color: var(--text);
  text-decoration: none;
  margin: 8px 0;
  font-size: 1.1rem;
  transition: color 0.2s;
}

#sidebar a:hover {
  color: var(--link);
}

#maincon {
  margin-left: 270px;
  padding: 30px;
  max-width: 900px;
}

footer {
  position: relative;
  bottom: 0;
  left: 0;
  width: 100%;
  text-align: center;
  background: rgb(57, 0, 150);
  color: #fff;
  padding: 20px 0;
  z-index: 1000;
}

@keyframes slideIn {
  0% { transform: translateX(-30px); }
  100% { transform: translateX(0); }
}

@keyframes slideOut {
  0% { transform: translateX(0); }
  100% { transform: translateX(-30px); }
}

.navbttn {
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 15px 25px;
  border-radius: 15px;
  margin: 13px 0;
  width: 100%;
  max-width: 260px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  overflow: hidden;
  transform: translateX(-30px);
  animation: slideOut 0.3s forwards;
}

.navbttn:hover {
  animation: slideIn 0.3s forwards;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
}

#sidebarlogo {
  border-radius: 15px;
}

#hero {
  height: 100vh;
  background: url("https://nirmini.dev/imgs/Rblx/Shaft.png") no-repeat center center/cover;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
}

#hero .overlay {
  background: rgba(0,0,0,0.5);
  padding: 40px;
  border-radius: 12px;
  color: white;
}

#hero h1 {
  font-size: 3rem;
  margin-bottom: 20px;
}

#hero .cta {
  display: inline-block;
  margin-top: 15px;
  padding: 12px 25px;
  background: #5308b6;
  color: white;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.3s;
}

#hero .cta:hover {
  background: #a434ff;
}

/* --- NAVBAR FIXES --- */
#navbar {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 15px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0,0,0,0.1);
  backdrop-filter: blur(6px);
  z-index: 1000;
}

#navbar img.logo {
  height: 50px !important;
  width: auto;
  margin-right: 40px;
}

#navbar img.logo-alt {
  display: none;
  height: 40px !important;
  width: auto;
}

#navbar nav {
  display: flex;
  align-items: center;
  position: relative;
}

#navbar nav a {
  color: white;
  margin-left: 20px;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
  position: relative;
}

#navbar nav a:hover {
  color: #a434ff;
}

/* Dropdowns appear BELOW navbar */
.nav-dropdown {
  display: none;
  position: absolute;
  top: 100%; /* directly below navbar */
  left: 0;
  background: rgba(20, 0, 40, 0.9);
  backdrop-filter: blur(8px);
  border-radius: 12px;
  padding: 10px 0;
  min-width: 180px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.25);
  z-index: 9999;
}

.nav-dropdown a {
  display: block;
  color: #fff;
  padding: 10px 15px;
  text-decoration: none;
  transition: background 0.2s;
}

.nav-dropdown a:hover {
  background: rgba(163, 52, 255, 0.25);
}

.nav-item:hover .nav-dropdown {
  display: block;
}

@media (max-width: 600px) {
  #navbar img.logo {
    display: none;
  }
  #navbar img.logo-alt {
    display: inline-block;
  }
}

/* --- SECTION STYLING --- */
section {
  padding: 80px 20px;
  margin: 0 auto;
  text-align: center;
  height: 100vh;
  width: 100%; /* fixed from 100vw */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: var(--text);
}

#about, #projects, #contact {
  color: white;
  width: 100%; /* fixed from 100vw */
}

#about {
  background: url("https://nirmini.dev/imgs/Rblx/Chamber.png") no-repeat center center/cover;
}

#projects {
  background: url("https://nirmini.dev/imgs/Rblx/NewCR.png") no-repeat center center/cover;
}

#contact {
  background: url("https://nirmini.dev/imgs/Rblx/Lights.png") no-repeat center center/cover;
}

section h2 {
  font-size: 2rem;
  margin-bottom: 20px;
  color: var(--heading);
}

section p, section ul {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 20px;
}

#services ul {
  list-style: none;
  padding: 0;
}

#services li {
  margin: 10px 0;
}

#contact form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-width: 1000px;
  margin: 0 auto;
}

#contact .form-container {
  width: 1000px; /* more traditional form width */
  max-width: 90%;
  background: rgba(0, 0, 0, 0.5);
  border: solid 2px rgba(255,255,255,1);
  padding: 30px;
  border-radius: 15px;
  backdrop-filter: blur(6px);
  margin: 0 auto;
}
#contact input,
#contact textarea {
  width: 100%; /* match container */
  padding: 12px;
  border: solid 1px rgba(255,255,255,1);
  border-radius: 15px;
  font-size: 1rem;
  background: rgba(45, 0, 66, 0.85);
  color: white;
}
#contact button {
  width: 100%;
  padding: 12px 30px;
  background: #5308b6;
  color: #fff;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: background 0.3s;
}
#contact button:hover {
  background: #a434ff;
}
#contact label {
  font-size: 1.1rem;
  color: #fff;
  align-self: flex-start;
}
.about-container,
.projects-container {
  width: 55%;
  background: rgba(0, 0, 0, 0.5);
  border: solid 2px rgba(255,255,255,1);
  padding: 30px;
  border-radius: 15px;
  backdrop-filter: blur(6px);
}