/* Reset & base */
* {
  box-sizing: border-box;
  scroll-behavior: smooth;
}
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  background: #121212;
  color: #e0e0e0;
  line-height: 1.6;
}
a {
  color: #00aaff;
  text-decoration: none;
  transition: color 0.3s ease;
}
a:hover {
  color: #0088cc;
  text-decoration: underline;
}
header {
  background: #1e1e1e;
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
}
header nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}
.logo {
  font-weight: 700;
  font-size: 1.5rem;
  color: #00aaff;
  font-family: 'Courier New', Courier, monospace;
  letter-spacing: 3px;
}
nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  padding: 0;
  margin: 0;
}
nav ul li {
  font-weight: 600;
}
nav ul li a {
  font-size: 1rem;
}
@media (max-width: 700px) {
  nav ul {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
  }
}
main {
  max-width: 1100px;
  margin: 2rem auto 4rem;
  padding: 0 1rem;
}
section {
  margin-bottom: 4rem;
  background: #1f1f1f;
  padding: 2rem 2.5rem;
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(0, 170, 255, 0.15);
  border: 1.5px solid rgba(0, 170, 255, 0.25);
}
h2 {
  font-size: 2rem;
  color: #00aaff;
  margin-bottom: 1rem;
  border-bottom: 3px solid #00aaff;
  padding-bottom: 0.3rem;
}
h3 {
  margin-top: 0;
  color: #00aaff;
}
p {
  font-size: 1.1rem;
  color: #c0c0c0;
}
img {
  max-width: 100%;
  border-radius: 10px;
}
button, .btn {
  padding: 0.75em 1.5em;
  background: #00aaff;
  border: none;
  border-radius: 36px;
  color: #121212;
  font-weight: 700;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.3s ease;
}
button:hover, .btn:hover {
  background: #0088cc;
}

/* Home Section */
#home .intro {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

#home .intro-photo {
  width: 200px; 
  height: 250px; 
  border-radius: 50%;
  object-fit: cover; 
  object-position: center; 
  transform: scale(1.1); 
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); 
}

#home .intro-text {
  flex: 1;
  min-width: 280px;
}

#home .intro-text h1 {
  font-size: 3rem;
  margin-bottom: 0.3rem;
  letter-spacing: 1.5px;
}

#home .intro-text h4 {
  font-weight: 600;
  font-size: 1.25rem;
  color: #00aaff;
  margin-bottom: 0.25rem;
}

#home .intro-text blockquote {
  font-style: italic;
  color: #66d9ff;
  margin: 0.5rem 0 1.25rem 0;
  border-left: 5px solid #00aaff;
  padding-left: 1rem;
}

/* Experience Section */
#experience ul {
  list-style: none;
  padding-left: 0;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: center; 
}

#experience li {
  background: #222222;
  padding: 1rem 1.2rem;
  border-radius: 12px;
  box-shadow: 0 0 25px rgba(0, 170, 255, 0.2);
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex-wrap: wrap;
  max-width: 90%; 
  text-align: center; 
}

.company-logo {
  max-width: 80px; 
  border-radius: 10px;
  filter: drop-shadow(0 0 3px #00aaff);
}

#experience li strong {
  color: #00aaff;
  font-size: 1.1rem;
}

#experience li em {
  color: #66d9ff;
}

#experience .details {
  flex: 1;
  min-width: 200px;
  text-align: left; 
}

/* Projects Section */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}
.project-card {
  background: #222222;
  border-radius: 16px;
  box-shadow: 0 0 30px rgba(0, 170, 255, 0.2);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  user-select: text;
}
.project-title {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
  color: #00aaff;
  text-align: center;
}
.project-desc {
  flex-grow: 1;
  font-size: 1rem;
  color: #b0cce6;
  margin-bottom: 1rem;
  user-select: text;
  text-align: center;
}
.hardware-specs {
  font-size: 0.9rem;
  margin-bottom: 1rem;
  background: #111;
  padding: 0.6rem;
  border-radius: 8px;
  border: 1px solid #00aaff;
  color: #9ac9ff;
  overflow-x: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
}
table th, table td {
  border: 1px solid #00aaff;
  padding: 0.3rem 0.6rem;
  text-align: center;
}
table th {
  background: rgba(0, 170, 255, 0.3);
}
.media {
  margin-bottom: 1rem;
}
.project-image {
  border-radius: 10px;
  max-height: 200px;
  display: block;
  margin: 0 auto 0.5rem;
  max-width: 100%;
  object-fit: contain;
  box-shadow: 0 0 20px #00aaff;
}
.video-wrapper iframe {
  width: 100%;
  height: 180px;
  border-radius: 10px;
  box-shadow: 0 0 20px #00aaff;
}

/* Code snippet styling */
pre {
  background: #010a15;
  color: #00aaff;
  font-family: 'Courier New', Courier, monospace;
  padding: 0.9rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  overflow-x: auto;
  user-select: text;
  margin-top: 0.75rem;
}

/* Styles for ROS topic displays and sensor charts */
#ros-topic-data, #ros-topic-data1, #ros-topic-data2, #ros-topic-data3 {
  background: #000a14;
  color: #00aaff;
  padding: 1rem;
  border-radius: 8px;
  max-height: 150px;
  overflow-y: auto;
}
#sensorChart1, #sensorChart2, #sensorChart3, #sensorChart4 {
  background: #000a14;
  border-radius: 8px;
}

/* Certifications & Awards */
/* Certifications & Awards - REVAMPED */
#certifications ul, #awards ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  list-style: none;
  padding-left: 0;
}

#certifications li, #awards li {
  background: linear-gradient(145deg, #2a2a2a, #202020);
  border-radius: 16px;
  padding: 2rem 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid rgba(0, 170, 255, 0.2);
  box-shadow: 5px 5px 15px rgba(0,0,0,0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

#awards li:hover, #certifications li:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 0 35px rgba(0, 170, 255, 0.3);
  border-color: rgba(0, 170, 255, 0.4);
}

#certifications li img {
  max-width: 150px;
  height: 120px;
  border-radius: 10px;
}

#awards li img {
  max-width: 70px;
  height: auto;
  margin-bottom: 1rem;
  filter: drop-shadow(0 0 10px rgba(0, 170, 255, 0.3));
}

#awards h4 {
  font-size: 1.2rem;
  color: #00aaff;
  font-weight: 700;
  margin: 0;
}

.organizer {
  font-style: italic;
  color: #aaa;
  margin-bottom: 1rem;
  font-size: 1rem;
}

.award-description {
  font-size: 0.95rem;
  color: #c0c0c0;
  line-height: 1.6;
}

/* Blog & Lab Notes */
.blog-post {
  margin-bottom: 2rem;
  background: #222222;
  border-radius: 16px;
  padding: 1.2rem 1.5rem;
  box-shadow: 0 0 30px rgba(0, 170, 255, 0.3);
}
.blog-post h4 {
  margin-top: 0;
  color: #00aaff;
}
.blog-post p {
  color: #a0c8ff;
}
pre.blog-code {
  background: #010a15;
  color: #00aaff;
  font-family: 'Courier New', Courier, monospace;
  padding: 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  overflow-x: auto;
  user-select: text;
  margin-top: 0.75rem;
}

/* Contact Section */
#contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
#contact form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 400px;
  width: 100%;
}
#contact input, #contact textarea {
  padding: 0.9rem 1.1rem;
  border-radius: 8px;
  border: none;
  font-size: 1rem;
  background: #111111;
  color: #e0e0e0;
}
#contact input::placeholder, #contact textarea::placeholder {
  color: #888;
}
#contact button {
  max-width: 220px;
  align-self: center;
  background: #00aaff;
  color: #121212;
  font-weight: 700;
  cursor: pointer;
  border: none;
  border-radius: 36px;
  padding: 0.75rem 1.5rem;
  font-size: 1.1rem;
  transition: background 0.3s ease;
}
#contact button:hover {
  background: #008ecc;
}
#contact .contact-methods {
  margin-top: 1.5rem;
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  justify-content: center;
  font-size: 1.1rem;
}
#contact .contact-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: #00aaff;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.3s ease;
}
#contact .contact-link:hover {
  color: #008ecc;
  text-decoration: underline;
}
#contact .contact-icon {
  color: #00aaff;
  font-size: 1.5rem;
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 1.5rem;
    padding-top: 1rem;
  }
  .skill-item {
    background: rgba(44, 62, 80, 0.4); /* Semi-transparent dark blue */
    border: 1px solid rgba(0, 170, 255, 0.3);
    border-radius: 12px;
    padding: 1.2rem 0.5rem;
    text-align: center;
    cursor: pointer;
    user-select: none;
    backdrop-filter: blur(5px); /* Glassy effect */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  }
  .skill-item img {
    width: 48px;
    height: 48px;
    margin-bottom: 0.75rem;
    object-fit: contain;
    filter: drop-shadow(0 0 4px rgba(0, 170, 255, 0.6));
    transition: transform 0.3s ease;
  }
  .skill-item span {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #e0e0e0;
  }
  .skill-item:hover,
  .skill-item:focus {
    transform: translateY(-8px) scale(1.05);
    border-color: rgba(0, 170, 255, 0.8);
    box-shadow: 0 0 25px rgba(0, 170, 255, 0.5);
    outline: none;
  }
  .skill-item:hover img {
      transform: scale(1.1);
  }

/* Footer */
footer {
  background: #1e1e1e;
  text-align: center;
  padding: 1rem 0;
  font-size: 0.9rem;
  color: #0077aa;
  user-select: none;
  margin-top: 3rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  #home .intro-photo {
    width: 150px;
    height: 150px;
    transform: scale(1.05);
  }
  #home .intro-text h1 {
    font-size: 2.5rem;
  }
  #home .intro-text h4 {
    font-size: 1.1rem;
  }
  #experience ul {
    flex-direction: column;
  }
  #experience li {
    flex-direction: column;
    align-items: center; 
    padding: 1rem; 
  }
  #experience .details {
    min-width: 100%;
    text-align: center; 
  }
  .projects-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
  #contact form {
    max-width: 100%;
  }
  #contact button {
    width: 100%;
  }
}


/* === NEW STYLES FOR INTERNSHIP PAGES === */

/* "Know More" link on the main page */
.know-more-link {
  display: inline-block;
  margin-top: 0.75rem;
  font-weight: 600;
  color: #66d9ff;
  text-decoration: none;
  transition: transform 0.3s ease, color 0.3s ease;
}

.know-more-link:hover {
  color: #fff;
  text-decoration: none;
  transform: translateX(5px);
}

/* Styles for the new dedicated internship pages */
.internship-detail-page {
  max-width: 900px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.back-link {
  display: inline-block;
  margin-bottom: 2rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: #00aaff;
}

.internship-header {
  text-align: center;
  margin-bottom: 2rem;
}

.internship-header img {
  max-width: 120px;
  border-radius: 12px;
  margin-bottom: 1rem;
  box-shadow: 0 0 15px rgba(0, 170, 255, 0.4);
}

.internship-header h1 {
  font-size: 2.5rem;
  color: #00aaff;
  margin: 0.5rem 0;
}

.internship-details ul {
  list-style-type: disc;
  padding-left: 20px;
  line-height: 1.8;
}

.internship-details li {
  margin-bottom: 0.75rem;
}

/* PDF Viewer Styling */
.pdf-viewer-container {
  margin-top: 3rem;
  border: 2px solid rgba(0, 170, 255, 0.3);
  border-radius: 12px;
  overflow: hidden; /* Ensures the iframe corners are rounded */
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.pdf-viewer-container iframe {
  display: block; /* Removes bottom space under the iframe */
  width: 100%;
  height: 800px;
  border: none;
}

.pdf-fallback-link {
  text-align: center;
  margin-top: 1rem;
  display: block;
}

/* === NEW STYLES FOR PROJECT DETAIL PAGES & 3D VIEWER === */

/* Main container for project detail pages */
.project-detail-page {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
}

/* 3D Viewer styles from your provided code */
#viewer-container {
  width: 100%;
  height: 60vh; /* Adjust height as needed */
  background: #1a1a2a;
  border-radius: 12px;
  position: relative; /* Needed for the loading overlay */
  border: 1px solid rgba(0, 170, 255, 0.3);
  margin-bottom: 2rem;
}

#loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  z-index: 10;
  transition: opacity 0.5s;
  color: white;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 1.2rem;
  background: rgba(26, 26, 42, 0.9);
  pointer-events: none;
  opacity: 0;
  border-radius: 12px;
}

#loading-overlay.visible {
  opacity: 1;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #00aaff;
  animation: spin 1s ease-in-out infinite;
  margin-bottom: 15px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Layout for project details below the viewer */
.project-content-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

@media (max-width: 900px) {
  .project-content-grid {
    grid-template-columns: 1fr; /* Stack columns on smaller screens */
  }
}