/* Master Stylesheet: Clean Minimal Engineering Theme */
:root {
  --bg-color: #0a0e17;
  --card-bg: #1e293b;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --accent: #38bdf8;
  --border-color: #334155;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: var(--font-family);
  line-height: 1.6;
  padding: 0 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
  overflow-x: hidden;
}

/* Navbar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  background-color: rgba(10, 14, 23, 0.95);
  z-index: 100;
}

.logo {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  margin-left: 1rem;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
}

.btn-resume {
  border: 1px solid var(--accent);
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  color: var(--accent) !important;
}

/* Universal Section Styling */
.hero, .updates-section, .featured-projects, .profile-header-section, .experience-section, .skills-section, .education-section, .projects-page-header, .contact-section {
  padding: 3rem 0;
  border-bottom: 1px solid var(--border-color);
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

h2 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.subtitle {
  font-size: 1.1rem;
  color: var(--accent);
  margin-bottom: 1rem;
}

.section-desc {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 700px;
}

.section-desc a {
  color: var(--accent);
  text-decoration: none;
}

/* Hero Section */
.hero {
  border-bottom: none;
}

.hero-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2.5rem;
}

.hero-text {
  flex: 1;
}

.bio {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 1rem;
}

.social-links {
  margin-top: 1.5rem;
}

.social-links a {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
}

.social-links a:hover {
  color: var(--accent);
}

/* Headshot Styling & Placeholder */
.hero-image-container {
  flex-shrink: 0;
  width: 350px;
  height: 350px;
  min-width: 350px;
  min-height: 350px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.headshot-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
  border: 3px solid var(--accent);
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.headshot-img:hover {
  transform: scale(1.02);
  box-shadow: 0 0 25px rgba(56, 189, 248, 0.35);
}

.headshot-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 16px;
  border: 2px dashed var(--accent);
  background-color: var(--card-bg);
  display: none;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
  text-align: center;
  padding: 1rem;
}

/* Extended Profile Bio */
.extended-bio p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 1.2rem;
  line-height: 1.7;
}

/* EXPERIENCE SECTION */
.exp-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2.5rem;
}

.exp-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
}

.exp-title h3 {
  font-size: 1.6rem;
  color: var(--text-primary);
}

.exp-role {
  color: var(--accent);
  font-weight: 600;
  font-size: 1.05rem;
}

.exp-meta {
  text-align: right;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.exp-date {
  font-style: italic;
  color: var(--accent);
}

.exp-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  align-items: start;
}

.exp-text p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1.2rem;
  line-height: 1.7;
}

.exp-media-stack {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.exp-img {
  width: 100%;
  border-radius: 10px;
  border: 2px solid var(--accent);
  object-fit: cover;
  background-color: var(--bg-color);
  transition: transform 0.2s ease;
}

.exp-img:hover {
  transform: scale(1.02);
}

/* Updates / News Carousel Box */
.updates-section {
  margin: 1rem 0 2rem 0;
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.8rem;
}

.updates-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.8rem;
}

.updates-header h2 {
  font-size: 1.3rem;
  margin-bottom: 0;
}

.carousel-btn {
  background-color: var(--bg-color);
  color: var(--accent);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  font-weight: bold;
  margin-left: 0.4rem;
  transition: all 0.2s;
}

.carousel-btn:hover {
  background-color: var(--accent);
  color: var(--bg-color);
}

.update-date {
  font-size: 0.8rem;
  background-color: var(--bg-color);
  color: var(--accent);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 0.6rem;
}

.update-slide h3 {
  font-size: 1.15rem;
  margin-bottom: 0.4rem;
}

.update-slide p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Projects Page Header */
.projects-header {
  padding: 3rem 0 1.5rem 0;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 2.5rem;
}

.projects-header h1 {
  font-size: 2.5rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.projects-header p {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

/* Projects Grid & Cards */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  padding-bottom: 4rem;
}

.project-card {
  background: #121824;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 8px 25px rgba(56, 189, 248, 0.15);
}

.card-img-box {
  width: 100%;
  height: 200px;
  background-color: #0b0f17;
  border-bottom: 1px solid var(--border-color);
  overflow: hidden;
  position: relative;
}

.card-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-tag {
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.card-title {
  font-size: 1.35rem;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.card-desc {
  color: var(--text-secondary);
  font-size: 0.93rem;
  line-height: 1.5;
  margin-bottom: 1rem;
  flex-grow: 1;
}

.card-skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}

.card-skill-tag {
  background: var(--card-bg);
  color: #e2e8f0;
  font-size: 0.75rem;
  padding: 0.25rem 0.55rem;
  border-radius: 5px;
  border: 1px solid var(--border-color);
}

.btn-view-project {
  align-self: flex-start;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Modal Window Styling */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(5, 8, 15, 0.85);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  padding: 1.5rem;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-container {
  background: #121824;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  width: 100%;
  max-width: 1050px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  padding: 2.5rem;
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal-container {
  transform: scale(1);
}

.close-btn {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  color: #cbd5e1;
  font-size: 1.5rem;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  z-index: 10;
}

.close-btn:hover {
  background: var(--accent);
  color: #0b0f17;
  border-color: var(--accent);
}

.project-detail-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 2.5rem;
  margin-top: 0.5rem;
}

.detail-sidebar h1 {
  font-size: 2.1rem;
  color: var(--accent);
  margin-bottom: 1.75rem;
  font-weight: 800;
  line-height: 1.15;
}

.meta-group {
  margin-bottom: 1.25rem;
}

.meta-label {
  font-size: 1rem;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.meta-value {
  color: #cbd5e1;
  font-size: 0.93rem;
  line-height: 1.4;
  white-space: pre-line;
}

.modal-skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.4rem;
}

.modal-skill-tag {
  background: var(--card-bg);
  color: #e2e8f0;
  font-size: 0.8rem;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  border: 1px solid var(--border-color);
}

.detail-main {
  display: flex;
  flex-direction: column;
}

.modal-hero-img {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  margin-bottom: 1.75rem;
  background-color: #0b0f17;
}

.detail-body p {
  color: #cbd5e1;
  font-size: 0.98rem;
  line-height: 1.75;
  margin-bottom: 1.25rem;
}

.nda-notice {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
  padding: 0.8rem 1rem;
  border-radius: 8px;
  font-size: 0.88rem;
  margin-top: 1rem;
  font-weight: 600;
}

.project-gallery-section {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.project-gallery-section h3 {
  font-size: 1.3rem;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.detail-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}

.detail-gallery img {
  width: 100%;
  height: 160px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  object-fit: cover;
  background-color: #0b0f17;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.detail-gallery img:hover {
  transform: scale(1.02);
  border-color: var(--accent);
}

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

.skill-category h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--accent);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
}

.skill-list {
  list-style: none;
}

.skill-list li {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  position: relative;
  padding-left: 1.2rem;
}

.skill-list li::before {
  content: "»";
  position: absolute;
  left: 0;
  color: var(--border-color);
}

/* Education Section */
.edu-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.edu-entry {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: flex-start;
  padding: 1.5rem;
  background-color: rgba(30, 41, 59, 0.4);
  border-radius: 10px;
}

.edu-main h3 {
  font-size: 1.15rem;
  margin-bottom: 0.3rem;
}

.edu-meta {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 0.3rem;
}

.edu-details {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Contact Page Styles */
.contact-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 2rem;
  margin-top: 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.contact-item h3 {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 0.3rem;
}

.contact-item a {
  color: var(--accent);
  text-decoration: none;
}

.contact-item a:hover {
  text-decoration: underline;
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem 0;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* Media Queries */
@media (max-width: 850px) {
  .exp-grid, .project-detail-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .exp-header {
    flex-direction: column;
    gap: 0.5rem;
  }
  .exp-meta {
    text-align: left;
  }
  .modal-container {
    padding: 1.5rem;
  }
  .detail-sidebar h1 {
    font-size: 1.8rem;
    margin-bottom: 1.25rem;
  }
  .modal-hero-img {
    max-height: 250px;
  }
}

@media (max-width: 768px) {
  .hero-container {
    flex-direction: column-reverse;
    text-align: center;
  }
  .hero-image-container {
    width: 240px;
    height: 240px;
    min-width: 240px;
    min-height: 240px;
  }
  .edu-entry {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}
