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

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

body {
  font-family: 'Segoe UI', sans-serif;
  background-color: #f5f7fa;
  color: #333;
  line-height: 1.6;
}

/* Container */
.container {
  width: 90%;
  max-width: 1100px;
  margin: auto;
  padding: 1.5rem 0;
}

/* Sticky Header */
header {
  background: #0d1b2a;
  color: white;
  padding: 0.5rem 0; /* Reduced padding */
  position: sticky;
  top: 0;
  z-index: 1000;
}

/* Navbar */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

header h1 {
  font-size: 1.2rem; /* Smaller title */
}

.navbar a {
  color: white;
  margin: 0 0.6rem; /* Reduced spacing */
  font-size: 0.85rem; /* Smaller font */
  text-decoration: none;
  font-weight: 600;
}

.navbar a:hover {
  text-decoration: underline;
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 3rem 1rem;
  background: #1b263b;
  color: white;
}

.profile-pic {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1rem;
}

.hero span {
  color: #e0e1dd;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: #3e5c76;
  color: white;
  text-decoration: none;
  margin-top: 1rem;
  border-radius: 5px;
}

/* Section Titles */
.section h2 {
  margin-bottom: 1rem;
  color: #0d1b2a;
  text-align: center;
}

/* Skills */
.skills-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.skills-list li {
  background: #3e5c76;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
}

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

.project {
  background: #e0e1dd;
  padding: 1rem;
  border-radius: 5px;
}

.project a {
  text-decoration: none;
  color: #1b263b;
  font-weight: bold;
}

/* Certificates */
.certificates-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.certificates-grid img {
  width: 300px;
  border-radius: 5px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

/* Contact */
form input,
form textarea {
  width: 100%;
  padding: 0.75rem;
  margin-bottom: 1rem;
  border: 1px solid #ccc;
  border-radius: 5px;
}

form button {
  background: #1b263b;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 5px;
  cursor: pointer;
}

/* Social Links */
.social {
  margin-top: 1rem;
  text-align: center;
}

.social a {
  margin: 0 1rem;
  text-decoration: none;
  color: #3e5c76;
}

/* Footer */
footer {
  text-align: center;
  padding: 1rem;
  background: #0d1b2a;
  color: white;
  margin-top: 2rem;
}

/* Animations */
.animate {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease-out;
}

.fade-in {
  opacity: 1;
  transform: translateY(0px);
}

/* Fixed scroll offset for anchor links */
section[id] {
  scroll-margin-top: 100px; /* Adjusted for smaller header */
}

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

  .navbar a {
    display: block;
    margin: 0.4rem 0;
    font-size: 1rem;
  }

  .certificates-grid img {
    width: 90%;
  }
}
