/* --- Global Styles --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Roboto', sans-serif;
  line-height: 1.6;
  background: #f9f9f9;
  color: #333;
  transition: background 0.3s, color 0.3s;
}

.container {
  width: 85%;
  margin: auto;
  max-width: 1200px;
}

/* --- Navbar --- */
nav {
  background: #333;
  color: #fff;
  padding: 15px 0;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
}

nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap; /* allow wrapping on small screens */
}

nav h2 {
  font-size: 1.5rem;
}

nav ul {
  display: flex;
  list-style: none;
}

nav ul li {
  margin-left: 20px;
}

nav ul li a {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s;
}

nav ul li a:hover {
  color: #ff9800;
}

/* Controls container */
.nav-controls {
  display: none;
  align-items: center;
  gap: 15px; /* more consistent spacing */
}

.nav-controls2 {
  display: flex;
  align-items: center;
  gap: 15px; /* more consistent spacing */
}

#modeToggle, #hamburger {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
}

/* Mobile Navbar */
@media (max-width:768px){
  nav ul {
    position: absolute;
    top: 60px;
    right: 0;
    background: #333;
    flex-direction: column;
    width: 100%; /* full width for mobile */
    display: none;
    padding: 10px 0;
  }
  nav ul.active {
    display: flex;
  }
  nav ul li {
    margin: 10px 0;
    text-align: center;
  }
  #hamburger {
    display: block;
  }
  .nav-controls {
    display: flex;
  }
}

/* --- Hero Section --- */
.hero {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), 
              url('https://dizllpxrrzrnbctqtjrc.supabase.co/storage/v1/object/public/Images/abidin.jpeg') no-repeat center center/cover;
  color: #fff;
}

.hero-content {
  max-width: 800px;
  padding: 20px;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
  text-shadow: 1px 1px 5px rgba(0,0,0,0.7);
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 20px;
  text-shadow: 1px 1px 5px rgba(0,0,0,0.7);
}

.btn {
  display: inline-block;
  padding: 10px 20px;
  margin: 5px;
  background: #ff9800;
  color: #fff;
  text-decoration: none;
  border-radius: 5px;
  transition: background 0.3s, transform 0.3s;
}

.btn:hover {
  background: #e68900;
  transform: translateY(-2px);
}

/* --- Sections --- */
section {
  padding: 80px 0;
}

h2 {
  text-align: center;
  margin-bottom: 20px;
  font-size: 2rem;
}

/* --- About Section --- */
#about p {
  text-align: center;
  max-width: 800px;
  margin: auto;
  font-size: 1.1rem;
}

/* --- Skills Section --- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.skill h3 {
  margin-bottom: 10px;
}

.progress {
  background: #ddd;
  height: 8px;
  border-radius: 5px;
  overflow: hidden;
}

.progress-bar {
  background: #ff9800;
  height: 8px;
  width: 0;
  transition: width 1.5s;
}

/* --- Projects Section --- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.project {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  transition: transform 0.3s, background 0.3s;
}

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

/* --- Contact Section --- */
form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-width: 600px;
  margin: auto;
}

form input, form textarea {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
}

form input:focus, form textarea:focus {
  outline: none;
  border-color: #ff9800;
  box-shadow: 0 0 5px rgba(255,152,0,0.5);
}

form button {
  background: #ff9800;
  border: none;
  padding: 12px;
  color: #fff;
  font-size: 1rem;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
}

form button:hover {
  background: #e68900;
  transform: translateY(-2px);
}

#formMessage {
  text-align: center;
  margin-top: 10px;
}

.social-links {
  margin-top: 20px;
  text-align: center;
}

.social-links a {
  color: #333;
  margin: 0 10px;
  font-size: 1.5rem;
  transition: color 0.3s;
}

.social-links a:hover {
  color: #ff9800;
}

/* --- Timeline --- */
.timeline {
  max-width: 800px;
  margin: auto;
  position: relative;
}

.timeline-item {
  background: #fff;
  padding: 20px;
  margin: 20px 0;
  border-left: 4px solid #ff9800;
  box-shadow: 0 3px 6px rgba(0,0,0,0.1);
}

/* --- Footer --- */
footer {
  background: #333;
  color: #fff;
  padding: 15px 0;
  text-align: center;
}

/* --- Dark Mode --- */
body.dark-mode {
  background: #121212;
  color: #f1f1f1;
}

.dark-mode nav {
  background: #1e1e1e;
}

.dark-mode .btn {
  background: #f1f1f1;
  color: #121212;
}

.dark-mode .btn:hover {
  background: #ff9800;
  color: #fff;
}

.dark-mode .project {
  background: #1e1e1e;
  color: #f1f1f1;
}

.dark-mode footer {
  background: #1e1e1e;
}

.dark-mode .timeline-item {
  background: #1e1e1e;
  border-left-color: #ff9800;
}

.dark-mode #formMessage,
.dark-mode .social-links a {
  color: #f1f1f1;
}

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

/* Spinner animation */
.spinner {
  display: inline-block;
  margin-left: 8px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}