/* ===== BASE ===== */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: Arial, sans-serif;
  margin: 0;
  background: #f5f5f5;
  color: #222;
  line-height: 1.5;
}

/* safety: prevent images from exceeding container width */
img {
  max-width: 100%;
  height: auto;
}

/* ===== HERO / BANNER ===== */
.hero {
  background-image: url("images/banner2.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  min-height: 70vh;
  padding: 60px 20px;

  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;

  color: #fff;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.hero > * { position: relative; }

.hero h1 {
  margin: 0 0 10px;
  font-size: 44px;
  letter-spacing: -0.5px;
}

.subtitle {
  margin: 0 0 14px;
  font-size: 16px;
  opacity: 0.95;
}

/* ===== NAV (sticky) ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;

  padding: 12px 12px;
  margin-top: 14px;

  background: rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);

  border-radius: 999px;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 10px;
  align-self: center;
}

.nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  padding: 8px 10px;
  border-radius: 999px;
  transition: transform 0.15s ease, background 0.15s ease;
}

.nav a:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

/* ===== MAIN CONTENT ===== */
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 20px;
}

.section { margin: 0 0 40px; }

.container h2 {
  text-align: center;
  margin: 0 0 22px;
  font-size: 26px;
}

/* ===== GRID LAYOUT ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

/* IMPORTANT: allow grid children to shrink (prevents overflow) */
.grid > * { min-width: 0; }

/* ===== CARDS ===== */
.card {
  background: #fff;
  padding: 24px 26px;
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

.card h3 {
  margin: 0 0 10px;
  font-size: 20px;
}

.card p {
  margin: 10px 0;
  line-height: 1.6;
}

/* ===== SKILLS: grouped + circular logos (NEW / FIXED) ===== */
.skills-group h3 {
  margin: 0 0 12px;
  font-size: 18px;
}

/* each group shows many small circular logos */
.skill-badges {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}

.skill-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
}

/* enforce SMALL circular logos (prevents huge SVGs) */
.skill-badge img {
  width: 46px;
  height: 46px;
  object-fit: contain;

  border-radius: 999px;
  padding: 10px;
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.skill-badge span {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

/* small note under some groups */
.skills-note {
  margin: 10px 0 0;
  font-size: 12px;
  opacity: 0.8;
}

/* ===== PROJECT THUMBNAILS (FIX OVERFLOW) ===== */
.card.project-card {
  padding: 0;        /* remove padding so image fits perfectly */
  overflow: hidden;  /* IMPORTANT: clips any overflow */
}

.card.project-card .project-img {
  width: 100%;
  height: 190px;
  display: block;    /* removes inline gap */
  object-fit: cover;
  border-radius: 0;  /* card handles rounding */
  margin: 0;
  transition: transform 0.25s ease;
}

/* add spacing back for the text content */
.card.project-card h3,
.card.project-card p,
.card.project-card .tags,
.card.project-card .link {
  padding: 0 26px;
}

.card.project-card h3 { margin-top: 18px; }

.card.project-card .link {
  padding-bottom: 22px;
  display: inline-block;
}

/* hover zoom stays inside the card */
.card.project-card:hover .project-img {
  transform: scale(1.03);
}

/* ===== TAGS / BADGES ===== */
.tags {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(47, 102, 255, 0.10);
  border: 1px solid rgba(47, 102, 255, 0.18);
  color: #1d3fb3;
  font-weight: 700;
}



/* ===== CERTIFICATIONS LIST (no cards) ===== */
.cert-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.cert-list li {
  margin-bottom: 1.25rem;
}

.cert-list li .tags {
  margin-top: 0.5rem;
}


/* ===== CERTIFICATION ICONS ===== */
.cert-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cert-icon {
  width: 75px;
  height: 75px;
  object-fit: contain;
}



/* ===== LINKS ===== */
.link {
  display: inline-block;
  margin-top: 10px;
  color: #2f66ff;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.15s ease;
}

.link:hover {
  text-decoration: underline;
  transform: translateX(2px);
}

/* ===== FOOTER ===== */
.footer {
  background: #0f172a;
  color: rgba(255, 255, 255, 0.86);
  padding: 28px 20px;
}

.footer-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  gap: 14px;
  justify-items: center;
  text-align: center;
}






.footer-text { margin: 0; }

.footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  transition: transform 0.15s ease, background 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.12);
}

.btn-ghost { background: transparent; }

/* ===== OPTIONAL: SIMPLE FADE-IN (no JS) ===== */
@media (prefers-reduced-motion: no-preference) {
  .hero h1,
  .subtitle,
  .nav { animation: fadeUp 600ms ease both; }

  .subtitle { animation-delay: 80ms; }
  .nav { animation-delay: 140ms; }

  .card { animation: fadeUp 520ms ease both; }
}

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

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .grid { grid-template-columns: 1fr; }

  /* skills: fewer columns on medium screens */
  .skill-badges { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  .hero h1 { font-size: 34px; }
  .subtitle { font-size: 14px; }
  .container { padding: 30px 16px; }

  .card { padding: 20px 18px; }

  .card.project-card h3,
  .card.project-card p,
  .card.project-card .tags,
  .card.project-card .link {
    padding: 0 18px;
  }

  .card.project-card .link { padding-bottom: 18px; }
  .card.project-card .project-img { height: 150px; }

  /* skills: fewer columns on small screens */
  .skill-badges { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
