/* Root variables for colours and typography */
:root {
  /* Colour palette for dark theme */
  --primary-color: #1e90ff; /* Dodger Blue */
  --secondary-color: #1db954; /* Green */
  --accent-color: #00adb5; /* Teal */
  --bg-color: #0d1b2a; /* Deep Navy */
  --card-bg: #15294a; /* Dark card background */
  --surface-bg: #102038; /* Slightly lighter for sections */
  --text-color: #e2e8f0; /* Light text */
  --muted-text: #9bb1c9; /* Muted text */
  --heading-font: 'Montserrat', sans-serif;
  --body-font: 'Open Sans', sans-serif;
}

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

body {
  font-family: var(--body-font);
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-color);
  scroll-behavior: smooth;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s;
}
a:hover {
  color: var(--secondary-color);
}

ul {
  list-style: none;
}

/* Container layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header Styles */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(7, 15, 30, 0.8);
  backdrop-filter: blur(10px);
  color: #fff;
  z-index: 1000;
  transition: background 0.3s;
}
header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 0;
}
header .logo {
  font-family: var(--heading-font);
  font-weight: 700;
  font-size: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
header nav ul {
  display: flex;
  gap: 1.2rem;
}
header nav li a {
  color: #ffffff;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 5px 0;
  position: relative;
}
header nav li a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  height: 2px;
  width: 0;
  background-color: var(--primary-color);
  transition: width 0.3s;
}
header nav li a:hover::after {
  width: 100%;
}

/* Highlight the active navigation link */
header nav li a.active {
  color: var(--secondary-color);
}
header nav li a.active::after {
  width: 100%;
  background-color: var(--secondary-color);
}

/* Mobile navigation toggle button */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 1001;
}
.nav-toggle:focus {
  outline: none;
}
.nav-toggle.active i {
  color: var(--secondary-color);
}

/* Hero Section */
.hero {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  text-align: center;
  /* Remove the static hero background image to make room for the animated contour canvas */
  background-image: none;
  overflow: hidden;
}
.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1;
}
.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 20px;
}

/* Canvas for animated contour lines in hero section */
#hero-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  /* Add slight blur and opacity for a subtle effect */
  opacity: 0.8;
  filter: brightness(0.7) contrast(1.2);
}

/* Full‑page background canvas */
#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  opacity: 0.4;
  filter: brightness(0.6) contrast(1.1);
}
.hero-title {
  font-family: var(--heading-font);
  font-size: 3rem;
  margin-bottom: 0.5rem;
  /* Center the name horizontally within the hero container */
  margin-left: auto;
  margin-right: auto;
}
.hero-subtitle {
  font-family: var(--heading-font);
  font-weight: 500;
  font-size: 1.5rem;
  margin-bottom: 1.2rem;
  color: var(--accent-color);
  /* Center the title horizontally within the hero container */
  margin-left: auto;
  margin-right: auto;
}
.hero-tagline {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}
.hero-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Layout for merged hero and about section */
.hero-content {
  width: 100%;
}
.hero-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 40px;
}

@media (min-width: 992px) {
  /* Keep hero content side-by-side on larger screens, but avoid excessive spacing */
  .hero-inner {
    flex-wrap: nowrap;
    justify-content: center;
  }
}
.hero-left {
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero-photo {
  width: 250px;
  height: 250px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--primary-color);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
}
.hero-right {
  /* Allow the text container to take more horizontal space on larger screens */
  flex: 1 1 500px;
  max-width: 900px;
  text-align: center;
  /* Push the name and title slightly lower within the hero section */
  padding-top: 1.5rem;
}
.hero-summary {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--muted-text);
  margin: 0.5rem 0 1.5rem;
  text-align: justify;
}

@media (max-width: 768px) {
  .hero-inner {
    gap: 40px;
  }
  .hero-photo {
    width: 180px;
    height: 180px;
  }
  .hero-right {
    text-align: center;
  }
  .hero-summary {
    text-align: center;
  }
}
.btn {
  display: inline-block;
  padding: 0.8rem 1.6rem;
  border-radius: 30px;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.9rem;
  transition: background 0.3s, color 0.3s;
  cursor: pointer;
}
.btn-primary {
  background-color: var(--primary-color);
  color: #fff;
}
.btn-primary:hover {
  background-color: var(--secondary-color);
}
.btn-secondary {
  background-color: var(--secondary-color);
  color: #fff;
}
.btn-secondary:hover {
  background-color: var(--primary-color);
}
.btn-outline {
  background-color: transparent;
  border: 2px solid var(--accent-color);
  color: var(--accent-color);
}
.btn-outline:hover {
  background-color: var(--accent-color);
  color: #fff;
}

/* Section generic styles */
.section {
  padding: 100px 20px;
  background-color: var(--surface-bg);
}
.section:nth-of-type(even) {
  background-color: var(--bg-color);
}
.section-title {
  text-align: center;
  font-family: var(--heading-font);
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 2.5rem;
  position: relative;
}
.section-title::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -10px;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background-color: var(--secondary-color);
}

/* About Section */
.about-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 1000px;
  margin: 0 auto;
  gap: 40px;
  flex-wrap: wrap;
}
.profile-photo {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid var(--primary-color);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
}
.about-content {
  flex: 1 1 300px;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--muted-text);
}

/* Timeline component */
.timeline {
  position: relative;
  margin: 0 auto;
  max-width: 900px;
  padding-left: 20px;
  border-left: 3px solid var(--primary-color);
}
.timeline-item {
  position: relative;
  padding-left: 30px;
  margin-bottom: 40px;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -9px;
  top: 5px;
  width: 15px;
  height: 15px;
  background-color: var(--secondary-color);
  border-radius: 50%;
}
.timeline-date {
  font-size: 0.8rem;
  color: var(--primary-color);
  margin-bottom: 5px;
  font-weight: 600;
}
.timeline-item h3 {
  font-family: var(--heading-font);
  font-size: 1.2rem;
  color: var(--text-color);
  margin-bottom: 5px;
}
.timeline-location {
  font-size: 0.85rem;
  color: var(--muted-text);
  margin-bottom: 10px;
}
.timeline-description {
  list-style: disc;
  margin-left: 20px;
  color: var(--muted-text);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Projects */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
}
.project-card {
  background-color: var(--card-bg);
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  padding: 20px;
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
}
.project-card h3 {
  font-family: var(--heading-font);
  font-size: 1.2rem;
  margin-bottom: 10px;
  color: var(--primary-color);
}
.project-card p {
  font-size: 0.9rem;
  color: var(--muted-text);
  flex-grow: 1;
}
.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

/* Projects Slider */
.projects-slider-wrapper {
  position: relative;
  overflow: hidden;
  max-width: 1100px;
  margin: 0 auto;
}
.projects-slider {
  display: flex;
  transition: transform 0.6s ease-in-out;
}
/* Each project slide occupies one of the visible slots (3 per view) */
.project-slide {
  flex: 0 0 calc(100% / 3);
  background-color: var(--card-bg);
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  padding: 30px;
  color: var(--text-color);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.project-slide h3 {
  font-family: var(--heading-font);
  font-size: 1.3rem;
  margin-bottom: 10px;
  color: var(--primary-color);
}
.project-slide p {
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 8px;
  color: var(--muted-text);
}
.project-slide p strong {
  color: var(--secondary-color);
}

/* Slider control buttons */
/* Slider control buttons – larger, semi-transparent arrows for manual sliding */
.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  border: none;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--text-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  transition: background-color 0.3s;
  backdrop-filter: blur(4px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}
.slider-btn:hover {
  background-color: rgba(255, 255, 255, 0.2);
}
.slider-btn i {
  font-size: 1.2rem;
}
.prev-btn {
  left: 15px;
  transform: translateY(-50%);
}
.next-btn {
  right: 15px;
  transform: translateY(-50%);
}

/* Slider indicator dots */
.slider-indicators {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 3;
}
.slider-indicators .indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: background-color 0.3s;
}
.slider-indicators .indicator.active {
  background-color: var(--primary-color);
}

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
}
.skill-item {
  background-color: var(--card-bg);
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  padding: 20px;
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
}
.skill-item i {
  color: var(--primary-color);
  margin-bottom: 10px;
}
.skill-item h4 {
  font-family: var(--heading-font);
  font-size: 1rem;
  margin-bottom: 10px;
  color: var(--text-color);
}
.skill-bar {
  background-color: #1f3b65;
  border-radius: 20px;
  height: 8px;
  width: 100%;
  overflow: hidden;
}
.skill-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  border-radius: 20px;
}
.skill-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

/* Publications */
 .publications .publication-list {
  max-width: 1000px;
  margin: 0 auto;
  padding-left: 20px;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--muted-text);
}
.publication-list li {
  margin-bottom: 15px;
}
.publication-list li em {
  font-style: italic;
}
.publication-list a {
  color: var(--primary-color);
}

/* Certifications */
 .cert-list {
  max-width: 900px;
  margin: 0 auto;
  padding-left: 20px;
  font-size: 0.95rem;
  color: var(--muted-text);
  line-height: 1.6;
}
.cert-list li {
  margin-bottom: 8px;
}

/* Publications Grid */
.publication-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
}
.publication-card {
  background-color: var(--card-bg);
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.3s, box-shadow 0.3s;
}
.publication-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}
.publication-card i {
  color: var(--primary-color);
  margin-bottom: 10px;
}
.publication-card p {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--muted-text);
  flex-grow: 1;
}
.publication-card a.doi-link {
  align-self: flex-start;
  font-size: 0.85rem;
  color: var(--accent-color);
  text-decoration: underline;
  transition: color 0.3s;
}
.publication-card a.doi-link:hover {
  color: var(--secondary-color);
}

/* Certifications Grid */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
}
.cert-card {
  background-color: var(--card-bg);
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  padding: 20px;
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
}
.cert-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}
.cert-card i {
  color: var(--primary-color);
  margin-bottom: 10px;
}
.cert-card h4 {
  font-family: var(--heading-font);
  font-size: 1rem;
  color: var(--text-color);
  margin-bottom: 5px;
}
.cert-card p {
  font-size: 0.85rem;
  color: var(--muted-text);
  line-height: 1.4;
}
.cert-card .cert-date {
  color: var(--secondary-color);
}

/* Contact Section */
.contact-wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px;
  max-width: 1000px;
  margin: 0 auto;
}
 .contact-info {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--muted-text);
}
.contact-info p {
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.contact-info i {
  color: var(--primary-color);
}

/* Style for inline SVG icons in the contact section */
.contact-info .contact-icon {
  margin-right: 10px;
  color: var(--primary-color);
  width: 1.1em;
  height: 1.1em;
  flex-shrink: 0;
}
.contact-form {
  display: flex;
  flex-direction: column;
}
.contact-form .form-group {
  margin-bottom: 15px;
}
.contact-form label {
  margin-bottom: 5px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--primary-color);
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #415a77;
  border-radius: 4px;
  font-size: 0.9rem;
  background-color: #132849;
  color: var(--text-color);
}
.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--muted-text);
}
.contact-form button {
  align-self: flex-start;
  margin-top: 10px;
}

/* Form status messages */

/* Footer */
footer {
  background-color: #07122c;
  color: var(--muted-text);
  text-align: center;
  padding: 20px 0;
  font-size: 0.85rem;
}
footer a {
  color: var(--primary-color);
}

/* Responsive tweaks */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.2rem;
  }
  .hero-subtitle {
    font-size: 1.2rem;
  }
  header .logo {
    font-size: 1rem;
  }
  header nav ul {
    gap: 0.8rem;
  }
  .section {
    padding: 80px 20px;
  }
  .timeline {
    padding-left: 15px;
  }
  .timeline-item {
    margin-bottom: 30px;
  }

  /* Mobile header layout: show hamburger and convert nav into off‑canvas menu */
  header .container {
    justify-content: space-between;
    align-items: center;
  }
  /* Hide the inline navigation by default and transform into a slide‑in menu */
  header nav ul {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 75%;
    max-width: 300px;
    background-color: #07122c;
    flex-direction: column;
    align-items: flex-start;
    padding: 80px 20px;
    gap: 1.5rem;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    z-index: 1000;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.5);
  }
  header nav ul.open {
    transform: translateX(0);
  }
  .nav-toggle {
    display: block;
  }
  header nav li a {
    font-size: 1.1rem;
  }

  /* Offset the hero section content to prevent the profile image from being hidden
     beneath the fixed header on smaller screens */
  .hero {
    /* Add extra padding to offset the fixed header so the profile image remains fully visible */
    padding-top: 120px;
  }
}

/* Extra small screens (phones) */
@media (max-width: 480px) {
  /* Reduce hero image size further to ensure it's fully visible on small devices */
  .hero-photo {
    width: 140px;
    height: 140px;
  }
  .hero-title {
    font-size: 2rem;
  }
  .hero-subtitle {
    font-size: 1.1rem;
  }
  .hero-inner {
    gap: 30px;
  }
}