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

body {
  font-family: Arial, Helvetica, sans-serif;
  background: #0a0a0a;
  color: #fff;
}

a {
  color: #fff;
  text-decoration: none;
}

.container {
  max-width: 1100px;
  margin: auto;
  padding: 2rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* ───── CARD ───── */
.card {
  background: #121212;
  border: 1px solid #262626;
  border-radius: 22px;
  padding: 1.75rem;
}

.card h2 {
  font-size: 1.35rem;
  margin-bottom: 1rem;
  letter-spacing: 0.01em;
}

/* ───── HERO ───── */
.hero {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1.75rem;
  align-items: center;
}

.hero-left {
  display: flex;
  justify-content: center;
}

.avatar {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
}

.hero-right h1 {
  font-size: 2.25rem;
  line-height: 1.15;
}

.subtitle {
  color: #c9c9c9;
  margin-top: 0.4rem;
  font-size: 1.05rem;
}

.bio {
  margin-top: 1rem;
  max-width: 700px;
  color: #a8a8a8;
  font-size: 1rem;
  line-height: 1.7;
}

.connect-row {
  margin-top: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.socials {
  display: flex;
  gap: 0.8rem;
}

.socials a {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #2a2a2a;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: background 0.25s ease, transform 0.25s ease;
}

.socials a:hover {
  background: #3a3a3a;
  transform: translateY(-2px);
}

.socials a i,
.socials a svg {
  width: 20px;
  height: 20px;
  color: #fff;
}

/* ───── PROJECTS ───── */
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.project-item {
  background: #1a1a1a;
  border-radius: 14px;
  padding: 1.1rem 1.25rem;
  display: flex;
  flex-direction: column;
}

.project-item h3 {
  font-size: 1rem;
}

.project-item p {
  color: #a8a8a8;
  margin-top: 0.3rem;
  font-size: 0.88rem;
  line-height: 1.5;
}

/* ─── Tech stack pills ─── */
.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.65rem;
}

.tech-pill {
  display: inline-flex;
  align-items: center;
  background: #262626;
  color: #888;
  padding: 0.2rem 0.55rem;
  border-radius: 20px;
  font-size: 0.7rem;
}

/* ─── Detail button ─── */
.detail-btn {
  margin-top: 0.8rem;
  align-self: flex-start;
  padding: 0.3rem 0.8rem;
  border: 1px solid #333;
  border-radius: 8px;
  background: transparent;
  color: #aaa;
  font-size: 0.75rem;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.detail-btn:hover {
  color: #fff;
  border-color: #555;
}

/* ───── VOLUNTEER ───── */
.volunteer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.volunteer-item {
  background: #1a1a1a;
  border-radius: 14px;
  padding: 1.1rem 1.25rem;
}

.volunteer-item h3 {
  font-size: 1rem;
}

.volunteer-item p {
  color: #a8a8a8;
  margin-top: 0.3rem;
  font-size: 0.88rem;
  line-height: 1.5;
}

/* ───── EDUCATION ───── */
.edu-text {
  color: #a8a8a8;
  font-size: 0.88rem;
  line-height: 1.5;
}

/* ───── CERTIFICATIONS ───── */
.cert-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.cert-item {
  background: #1a1a1a;
  border-radius: 14px;
  padding: 1.1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.cert-item h3 {
  font-size: 1rem;
}

.credential-btn {
  align-self: flex-start;
  padding: 0.35rem 0.9rem;
  border: 1px solid #333;
  border-radius: 8px;
  background: transparent;
  color: #aaa;
  font-size: 0.75rem;
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.credential-btn:hover {
  color: #fff;
  border-color: #555;
}

/* ───── MODAL ───── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(10px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s ease, visibility 0.35s ease, backdrop-filter 0.35s ease;
}

.modal-overlay.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal-box {
  width: 90%;
  max-width: 800px;
  background: #111;
  border-radius: 20px;
  padding: 1.5rem;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.92) translateY(20px);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

.modal-overlay.show .modal-box {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.close-btn {
  position: absolute;
  right: 15px;
  top: 15px;
  background: none;
  color: #fff;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  z-index: 10;
  transition: transform 0.2s ease;
}

.close-btn:hover {
  transform: scale(1.2);
}

/* ─── Carousel (single-image slider with arrows) ─── */
.carousel-wrapper {
  position: relative;
  width: 100%;
}

.carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 14px;
  background: #0a0a0a;
  aspect-ratio: 16 / 9;
}

.carousel-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
}

.carousel-slide.active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.carousel-slide.exit-left {
  opacity: 0;
  transform: translateX(-40px);
}

.carousel-slide.exit-right {
  opacity: 0;
  transform: translateX(40px);
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  background: #0a0a0a;
}

/* ─── Arrow buttons ─── */
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  transition: background 0.2s ease, box-shadow 0.2s ease;
  backdrop-filter: blur(4px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.carousel-arrow:hover {
  background: rgba(0, 0, 0, 0.65);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.carousel-arrow-left {
  left: 10px;
}

.carousel-arrow-right {
  right: 10px;
}

.modal-content {
  margin-top: 1rem;
}

.modal-content h3 {
  font-size: 1.3rem;
}

.modal-content p {
  color: #a8a8a8;
  margin-top: 0.4rem;
  line-height: 1.6;
}


/* ───── MOBILE ───── */
@media (max-width: 768px) {

  .container {
    gap: 1rem;
  }

  .hero {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-right h1 {
    font-size: 1.6rem;
  }

  .connect-row {
    justify-content: center;
    flex-wrap: wrap;
  }

  .grid,
  .volunteer-grid,
  .cert-grid {
    grid-template-columns: 1fr;
  }

  .avatar {
    width: 140px;
    height: 140px;
  }

  .card {
    padding: 1.25rem;
  }


  .carousel-arrow {
    width: 32px;
    height: 32px;
    font-size: 1.2rem;
  }
}