/* General Reset and Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f4f7f9;
  color: #333;
  line-height: 1.6;
}

a {
  color: #004080;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Header with Gradient */
header {
  background: linear-gradient(to right, #002244, #004080);
  color: white;
  text-align: center;
  padding: 60px 20px;
}

header h1 {
  font-size: 2.8em;
}

header p {
  font-size: 1.2em;
  margin-top: 10px;
}

/* Sticky Navigation Bar */
nav {
  background-color: #004080;
  position: sticky;
  top: 0;
  z-index: 999;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

nav ul li a {
  display: block;
  padding: 15px 25px;
  color: white;
  font-weight: bold;
  transition: background 0.3s ease;
}

nav ul li a:hover {
  background-color: #0059b3;
}

/* Containers & Sections */
.container {
  max-width: 1100px;
  margin: auto;
  padding: 20px;
}

.section {
  padding: 60px 20px;
}

.section.dark {
  background-color: #eaf1fb;
}

h2 {
  color: #003366;
  margin-bottom: 20px;
  font-size: 2em;
}

/* About */
.about-grid {
  display: flex;
  gap: 40px;
  align-items: center;
  flex-wrap: wrap;
}

.about-text {
  flex: 1;
}

.about-photo img {
  max-width: 300px;
  border-radius: 10px;
  box-shadow: 0 0 12px rgba(0,0,0,0.1);
}

/* Services with Gradient */
.service-section {
  background: linear-gradient(to bottom right, #e3f2fd, #bbdefb);
}

.service-grid {
  display: grid;
  gap: 30px;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.service-item {
  background: white;
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  transition: transform 0.3s ease;
}

.service-item:hover {
  transform: translateY(-5px);
}

.service-item img {
  height: 60px;
  margin-bottom: 15px;
}

/* Projects */
.project-grid {
  display: grid;
  gap: 25px;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.project-item {
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  padding: 15px;
  text-align: center;
}

.project-item img {
  width: 100%;
  border-radius: 6px;
  margin-bottom: 10px;
}

/* Skills */
.skills-grid {
  display: grid;
  gap: 30px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.skill-item {
  background: white;
  text-align: center;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
}

.skill-item img {
  width: 70px;
  height: 70px;
  object-fit: contain;
  margin-bottom: 10px;
}

/* Education with Gradient */
.education-section {
  background: linear-gradient(to right, #f0f4ff, #e0eafc);
}

.education-grid {
  display: grid;
  gap: 30px;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.education-item {
  background-color: #ffffff;
  padding: 20px;
  border-left: 6px solid #003366;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

/* Referees */
.referees-section {
  background-color: #f5faff;
}

.referee-cards {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.referee-item {
  background: #fff;
  padding: 20px;
  border-left: 6px solid #004080;
  border-radius: 8px;
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.05);
}

/* Contact Section with Gradient */
.contact-section {
  background: linear-gradient(to right, #d7e7f5, #ffffff);
}

.contact-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  justify-content: space-between;
  align-items: flex-start;
}

.contact-info {
  flex: 1;
  font-size: 1.1em;
  background: #ffffff;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}

.contact-form {
  flex: 1;
  background: #ffffff;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}

.contact-form form {
  display: flex;
  flex-direction: column;
}

.contact-form input,
.contact-form textarea {
  padding: 12px;
  margin-bottom: 15px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1em;
}

.contact-form button {
  padding: 12px;
  background-color: #004080;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1em;
  cursor: pointer;
}

.contact-form button:hover {
  background-color: #003366;
}

/* Footer with Gradient */
footer {
  background: linear-gradient(to right, #002244, #003366);
  color: white;
  text-align: center;
  padding: 20px;
  font-size: 0.95em;
  margin-top: 40px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  nav ul {
    flex-direction: column;
  }

  .about-grid,
  .contact-grid {
    flex-direction: column;
  }

  .about-photo img {
    width: 100%;
    max-width: 100%;
  }
}
