/*  RESET  */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
}

/*  BODY  */
body {
    background: linear-gradient(180deg, #0f172a, #1e1b4b);
    color: white;
    line-height: 1.6;
}
/*  DARK MODE BUTTON  */
#theme-toggle {
    position: fixed;
    top: 15px;
    right: 20px;
    padding: 8px 16px;
    border-radius: 20px;
    border: none;
    cursor: pointer;
    background: rgba(255,255,255,0.15);
    color: white;
    font-weight: bold;
    transition:  0.3s, transform 0.2s;
    z-index: 1000;
}

#theme-toggle:hover {
    background: rgba(255,255,255,0.25);
    transform: scale(1.05);
}

/*  LIGHT MODE (AI Help)  */
/* Light mode */
[data-theme="light"] body {
  background: #ffffff;
  color: #020617;
}

/* Dark mode  */
[data-theme="dark"] body {
  background: #020617;
  color: #e5e7eb;
}


[data-theme="light"] .stars {
  display: none;
}

[data-theme="dark"] .stars {
  display: block;
}





/*  NAVBAR  */
header {
    background: rgba(0,0,0,0.3);
    padding: 15px 0;
}

.hero .subtitle {
    color:#a280f1;
    font-size:1.8rem;
    font-weight: 500;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 30px;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: bold;
}

/*  HERO  */
.hero {
    height: 60vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.hero h1 {
    font-size: 42px;
    font-weight: bold;

    background: linear-gradient(
        90deg,
        #a5b4fc,
        #818cf8,
        #60a5fa,
        #a5b4fc
    );
    background-size: 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;

    animation: glowMove 6s ease infinite;
    text-shadow:
        0 0 20px rgba(165,180,252,0.6),
        0 0 40px rgba(129,140,248,0.4);
}

@keyframes glowMove {
    0% { background-position: 0%; }
    100% { background-position: 100%; }
}

.hero p {
    font-size: 18px;
    margin-top: 10px;
    opacity: 1.0;
}

/*  SECTIONS  */
section {
    padding: 80px 20px;
    text-align: center;
}

section h2 {
    font-size: 32px;
    margin-bottom: 20px;
}

/*  ABOUT  */
#about p {
    max-width: 700px;
    margin: 0 auto;
    font-size: 18px;
    opacity: 0.9;
}

/*  PROJECTS  */
.projects-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);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.3s ease;
}

.project-card:hover {
  transform: translateY(-6px);
}

.project-card img {
  width: 100%;
  height: auto;        
  max-height: 280px;   
  object-fit: contain; 
  background: #0f172a; 
  padding: 12px;
}


.project-card h3 {
  margin: 1rem;
  color: #8b5cf6; 
}

.project-card p {
  margin: 0 1rem 1.5rem;
  opacity: 0.85;
}


/*  SKILLS  */
.skills-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 30px;
}

.skill {
    width: 120px;
    height: 120px;
    border-radius: 20px;
    background: rgba(255,255,255,0.08);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.skill i {
    font-size: 36px;
    color: #c77dff;
}

.skill span {
    font-size: 15px;
}

.skill:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(199,125,255,0.5);
}

/*  STARS BACKGROUND - AI help */
.stars {
    position: fixed;
    inset: 0;
    background: 
    radial-gradient(5px 5px at 20% 30%, white, transparent),
    radial-gradient(6px 6px at 80% 70%, #c7d2fe, transparent),
    radial-gradient(7px 7px at 50% 50%, white, transparent),
    radial-gradient(5px 5px at 10% 80%, #e0e7ff, transparent),
    radial-gradient(6px 6px at 90% 20%, #a5b4fc, transparent),
    radial-gradient(5px 5px at 30% 60%, white, transparent);

        
    background-size: 300px 300px;
    animation: starsMove 80s linear infinite;
    opacity: 0.35;
    z-index: -1;
}

@keyframes starsMove {
    from { transform: translateY(0); }
    to { transform: translateY(-1200px); }
}


/*  CONTACT  */
.contact-form {
  max-width: 500px;
  margin: 2rem auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-form input,
.contact-form textarea {
  padding: 12px;
  border-radius: 8px;
  border: none;
  outline: none;
  font-size: 1rem;
}

.contact-form button {
  background: #4b0bb1; 
  color: white;
  padding: 12px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
}

.contact-form button:hover {
  opacity: 0.9;
}

/* ===== GitHub API Section ===== */
#api-message {
  margin-top: 1rem;
  font-size: 1rem;
  color: #fca5a5;
}

.project-card a {
  display: inline-block;
  margin-bottom: 1rem;
  color: #60a5fa;
  text-decoration: none;
  font-weight: bold;
}

.project-card a:hover {
  text-decoration: underline;
}

.repo-icon {
  margin-top: 1rem;
  font-size: 2rem;
  color: #c77dff;
}

/* ===== Project Controls ===== */
.project-controls {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.project-controls button,
.project-controls select {
  padding: 10px 16px;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  cursor: pointer;
}

.project-controls button {
  background: #4b0bb1;
  color: white;
}

.project-controls select {
  background: white;
  color: #111827;
}

/* ===== Contact Form Message ===== */
#form-message {
  margin-top: 0.5rem;
  font-weight: bold;
}

/* ===== Visitor Timer ===== */
#visitor-timer p {
  font-size: 1.2rem;
  margin-top: 1rem;
}

#time-counter {
  color: #c77dff;
  font-weight: bold;
}

.filter-btn.active {
  outline: 2px solid white;
  transform: scale(1.05);
}

/* ===== Visitor Name Section ===== */
.name-box {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
  margin-bottom: 20px;
}

.name-box input {
  padding: 12px;
  border-radius: 10px;
  border: none;
  outline: none;
  font-size: 1rem;
  min-width: 220px;
}

.name-box button {
  padding: 12px 18px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 1rem;
  background: #4b0bb1;
  color: white;
}

.name-box button:hover {
  opacity: 0.9;
}

#visitor-greeting {
  font-size: 1.1rem;
  font-weight: bold;
  margin-top: 10px;
}

/* ===== Fix Theme Button Overlap ===== */

@media (max-width: 768px) {
  #theme-toggle {
    top: auto;
    bottom: 20px;
    right: 20px;
  }
}
.visually-hidden {
    position: absolute;
    left: -9999px;
}