:root {
  --primary: #001F3F;
  --background: #F7E7CE;
}

body {
  margin: 0;
  font-family: 'Quicksand', sans-serif;
  background: var(--background);
  color: var(--primary);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6, p, a, li, button {
  font-family: 'Quicksand', sans-serif;
}

h1, h2, h3 {
  color: var(--primary);
}

.icon-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  list-style: none;
  padding: 0;
  margin: 8px 0 24px 0;
}

.icon-list i {
  font-size: 40px;
}

.icon-list img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.item {
  text-align: left;
}

.btn {
  background: var(--primary);
  color: var(--background);
  border: none;
  padding: 0.8rem 1.5rem;
  border-radius: 10px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-block;
}

.btn:hover {
  transform: translateY(-4px); 
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

header {
  background: var(--primary);
  padding: 1.2rem 3rem;
  position: sticky;
  top: 0;
  z-index: 1000;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-left img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 3rem;
}

#navbar {
  list-style: none;
  display: flex;
  gap: 2.5rem;
  margin: 0;
  padding: 0;
}

#navbar a {
  text-decoration: none;
  font-weight: 600;
  font-size: 1.3rem;
  color: var(--background);
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
  display: inline-block;
}

#navbar a:hover {
  transform: translateY(-3px);
}

#navbar a.active {
  border-color: var(--background);
}

#navbar a:visited,
#navbar a:focus {
  color: var(--background);
}

.social-icons {
  display: flex;
  gap: 1.5rem;
}

.social-icons a {
  font-size: 1.5rem;
  color: var(--background);
  transition: transform 0.2s ease, color 0.3s ease;
}

.social-icons a:hover {
  transform: translateY(-3px);
  color: #FFD700;
}

main {
  flex: 1;
  padding: 5rem 2rem;
  max-width: 1400px;
  margin: auto;
}

.about {
  text-align: center;
}

.about img {
  width: 200px;
  border-radius: 25%;
  border: 6px solid var(--primary);
}

.about h2 {
  margin-top: 1.5rem;
  font-size: 2rem;
}

.about p {
  margin-top: 0.5rem;
  font-size: 1.2rem;
  text-align: justify;
}

.about-card {
  background: rgba(0, 31, 63, 0.05);
  border-radius: 20px;
  padding: 2.5rem;
  margin: 2.5rem auto;
  width: 98%;
  max-width: 1600px;
  text-align: center;
}

.certifications-grid {
  width: 98%;
  max-width: 1600px;
  margin: 2.5rem auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.6rem;
  align-items: stretch;
  padding: 0;
}

.certification-card {
  background: rgba(0, 31, 63, 0.05);
  border-radius: 20px;
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.certification-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 12px;
  border: 3px solid var(--primary);
  display: block;
}

.certification-card h3 {
  font-size: 1.1rem;
  margin: 0 0 0.5rem 0;
  color: var(--primary);
}

.project-card {
  background: rgba(0, 31, 63, 0.05);
  border-radius: 20px;
  margin: 2.5rem auto;
  padding: 2.5rem;
  display: flex;
  gap: 2rem;
  align-items: center;
  width: 98%;
  max-width: 1600px;
}

.project-card:nth-child(even) {
  flex-direction: row-reverse;
}

.project-card img {
  width: 45%;
  border-radius: 25px;
  object-fit: cover;
  border: 3px solid var(--primary);
}

.project-info {
  flex: 1;
  text-align: center;
}

.project-info h3 {
  font-size: 2rem;
  text-align: center;
}

.project-info p {
  font-size: 1.2rem;
  text-align: justify;
}

.project-info a {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.7rem 1.2rem;
  background: var(--primary);
  color: var(--background);
  text-decoration: none;
  border-radius: 10px;
  font-weight: 600;
  transition: transform 0.2s ease, background 0.3s ease;
}

.project-info a:hover {
  background: #003366;
  transform: translateY(-3px);
}

footer {
  background: var(--primary);
  color: var(--background);
  text-align: center;
  padding: 1.5rem;
}

.footer-icons {
  margin-bottom: 0.5rem;
}

.footer-icons a {
  color: var(--background);
  margin: 0 0.5rem;
  font-size: 1.2rem;
  display: inline-block;
  transition: transform 0.2s ease, color 0.3s ease;
}

.footer-icons a:hover {
  transform: translateY(-3px);
  color: #ffcc00;
}

.cert-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  cursor: zoom-out;
}

.cert-popup {
  position: relative;
  max-width: 95%;
  max-height: 95%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.cert-popup img {
  max-width: 100%;
  max-height: 80vh;
  height: auto;
  border-radius: 12px;
  border: 4px solid var(--background);
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
  cursor: zoom-in;
  transition: transform 0.3s ease;
  transform-origin: center center;
}

.cert-popup img.zoomed {
  cursor: grab;
  transition: none;
}
.cert-popup img.zoomed:active {
  cursor: grabbing;
}

.cert-popup .close-btn {
  position: absolute;
  top: -14px;
  right: -14px;
  background: var(--primary);
  color: var(--background);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}