body {
  margin: 0;
  background-color: #0f172a;
  color: #f1f5f9;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  overflow-x: hidden;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 2rem;
  text-align: center;
}

h1 {
  font-size: 3.2rem;
  font-weight: 800;
  color: #0fb4f6; /* icon blue */
  text-align: center;
  margin-bottom: 1rem;
}

.tagline {
  font-size: 1.1rem;
  font-weight: 400;
  color: #cbd5e1;
  max-width: 700px;
  margin: 1rem auto 2.5rem;
  text-align: center;
  line-height: 1.7;
  opacity: 0.9;
}

h2 {
  font-size: 2rem;
  color: #f8fafc;
  margin-top: 2.5rem;
  font-weight: 700;
}

.info-card {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  padding: 1.75rem 2rem;
  max-width: 720px;
  margin: 2rem auto;
  text-align: left;
  font-size: 1.05rem;
  line-height: 1.6;
}

.info-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
  color: #e2e8f0;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
  justify-items: center;
}

.card {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.4);
  width: 100%;
  max-width: 320px;
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: fadeInScale 0.6s ease forwards;
  opacity: 0;
  cursor: pointer;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.6);
}

.card h3 {
  font-size: 1.15rem;
  margin: 0 0 0.25rem;
  color: #e2e8f0;
}

.card .subtitle {
  font-size: 0.85rem;
  color: #94a3b8;
  font-style: italic;
  margin-bottom: 1.5rem;
}


.card p {
  font-size: 0.95rem;
  color: #cbd5e1;
  flex-grow: 1;
  margin: 0.5rem 0;
}

.icon-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 50px;
  margin-bottom: 8px;
}

.icon-svg,
.icon-img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex-shrink: 0;
}


.card:hover .icon-svg,
.card:hover .icon-img {
  transform: scale(1.3);
  filter: drop-shadow(0 0 30px rgba(41, 135, 249, 0.514));
}

.card.non-clickable {
  cursor: default;
  justify-content: flex-start;
}


.tags {
  margin-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
}

.tag {
  background: #3b82f6;
  color: white;
  padding: 0.25rem 0.6rem;
  border-radius: 12px;
  font-size: 0.8rem;
  margin: 0.2rem 0.4rem 0.4rem 0;
}

.pill {
  background: #3b82f6;
  color: white;
  padding: 0.25rem 0.6rem;
  border-radius: 12px;
  font-size: 0.8rem;
  margin: 0.2rem 0.4rem 0.4rem 0;
}

.tag,
.pill {
  word-break: break-word;
  max-width: 100%;
}
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-overlay.active {
  display: flex;
}

.info-card .tag {
  font-size: 0.8rem !important;
  padding: 0.25rem 0.6rem !important;
  line-height: 1.2;
}

.modal-content {
  background: #1e293b;
  border-radius: 10px;
  padding: 1.5rem;
  max-width: 50vw;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  color: #f1f5f9;
  box-shadow: 0 8px 20px rgba(0,0,0,0.5);
}


.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 1.4rem;
  background: none;
  border: none;
  cursor: pointer;
  color: #cbd5e1;
}

.modal-content h3 {
  margin-top: 0;
  color: #f8fafc;
}

.modal-content p {
  font-size: 1rem;
  color: #cbd5e1;
}

.modal-tags {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
}

/* Navigation */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: #020617;
  padding: 0.75rem 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
  z-index: 1000;
}

.site-header nav {
  display: flex;
  justify-content: center;
  gap: 2rem;
}

.site-header nav a {
  color: #f8fafc;
  font-weight: 600;
  text-decoration: none;
  position: relative;
  padding-bottom: 2px;
  transition: color 0.2s ease;
}

.site-header nav a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  height: 2px;
  width: 0;
  background-color: #3b82f6;
  transition: width 0.25s ease;
}

.site-header nav a:hover::after,
.site-header nav a.active::after {
  width: 100%;
}

.site-header nav a:hover {
  color: #93c5fd;
}

.site-footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 1rem;
  text-align: center;
  font-size: 0.85rem;
  margin-top: 3rem;
}

.subtle-link {
  color: #60a5fa;
  font-weight: 500;
  text-decoration: none;
}

.subtle-link:hover {
  text-decoration: underline;
  color: #93c5fd;
}

#modal-pdf-container {
  display: flex;
  justify-content: center; /* horizontal center */
  align-items: center;     /* vertical center (optional here) */
  padding: 0.5rem;
  box-sizing: border-box;
  width: 100%;
}

#modal-pdf {
  width: 80%;
  max-width: 800px;
  height: 480px;
  border: none;
  border-radius: 6px;
  display: block;
  margin: 0 auto; /* ← This ensures it centers inside any parent */
}

.section-dark {
  background-color: #0b1120;
  padding: 1.5rem 1.5rem;
}

.section-darker {
  background-color: #0b1120;
  padding: 1.5rem 1.5rem;
}

section h2 {
  text-align: center;
  margin-top: 0;
}


/* Animations (Professional and Minimal) */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }
.card:nth-child(5) { animation-delay: 0.5s; }
.card:nth-child(6) { animation-delay: 0.6s; }

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Apply fade-in to container */
.container {
  animation: fadeInUp 0.8s ease forwards;
  opacity: 0;
}

/* Cards animate individually */
.card {
  animation: fadeInScale 0.6s ease forwards;
  opacity: 0;
  transform: scale(0.98);
}

.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }
.card:nth-child(5) { animation-delay: 0.5s; }
.card:nth-child(6) { animation-delay: 0.6s; }

/* Fade-in for modal */
.modal-content {
  animation: fadeInScale 0.3s ease forwards;
}

#modal-image-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: .5rem;
  max-height: 80vh;
  overflow: auto;
  box-sizing: border-box;
}

#modal-image {
  width: 80%;
  height: auto;
  max-width: 800px;
  max-height: 48vh;
  object-fit: contain;
  border-radius: 6px;
  display: block;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  padding: 0 1rem;
  justify-items: center;
}
.work-grid .card {
  max-width: none;
  width: 100%;
}

.work-grid ul.work-bullets {
  list-style-type: disc;
  padding-left: 1.5rem;
  margin: 0;
  font-size: 0.94rem;
  color: #cbd5e1;
  line-height: 1.6;
  text-align: left;
}

.work-grid ul.work-bullets li {
  margin-bottom: 0.6rem;
}

.section-dark h2 {
  margin-bottom: 2.5rem;
}

.info-card h3 {
  margin-top: 0rem;
  margin-bottom: 0rem;
}

.top-padded {
  margin-top: 1.5rem;
}

@media (max-width: 600px) {
  .work-grid {
    grid-template-columns: 1fr;
  }
  .modal-overlay {
    align-items: flex-start;
    padding: 1rem;
    overflow-y: auto;
  }

  .modal-content {
    width: 100vw !important;
    max-width: 100vw !important;
    margin: 0;
    border-radius: 0;
    height: auto;
    max-height: none;
    overflow-y: auto;
    padding: 1rem;
    box-sizing: border-box;
  }

  #modal-image-container {
    width: 100%;
    max-height: none;
    margin-top: 0.5rem;
  }

  #modal-image {
    width: 100%;
    height: auto;
    max-height: 250px;
    object-fit: contain;
  }

  #modal-pdf {
    width: 100%;
    max-width: 100%;
    height: 300px;
  }
  .modal-close {
    top: 0.75rem;
    right: 0.75rem;
    font-size: 1.6rem;
    padding-left: 0.5rem;
    background-color: transparent;
    z-index: 10;
  }
  .tag,
  .pill {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
  }
}

@media (max-width: 900px) {
  .project-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .project-grid {
    grid-template-columns: 1fr;
  }
}

body.scroll-lock {
  position: fixed;
  overflow: hidden;
  width: 100%;
}