/* This is the required project styling. Will contain essential CSS styles like:
   * Flex property
   * Grid layout
   * Cards and sections
*/

@import url(https://fonts.googleapis.com/css?family=Raleway:100,200,300,regular,500,600,700,800,900,100italic,200italic,300italic,italic,500italic,600italic,700italic,800italic,900italic);

/* variables */
:root {
  /* Colors */
  --primary-color: #ffcd42;
  --secondary-color: #ffd35c;
  --bg-primary: #ffffff;
  --text-color: #222222;
  --text-color-two: #ffffff;
  --bg-secondary: #000000;
  --card-background: #f4f4f4;
  --bg-secondary-two: #111111;

  --shadow: 0 10px 40px rgba(0, 0, 0, 0.2);

  /* Font Weight */
  --weight-small: 400;
  --weight-semibold: 600;
  --weight-bold: 800;

  /* Max width */
  --width-small: 600px;
  --width-medium: 1100px;
  --width-large: 1300px;
}

[data-theme="dark"] {
  --primary-color: #ffcd42;
  --secondary-color: #ffd35c;
  --bg-primary: #000000;
  --text-color: #ffffff;
  --text-color-two: #222222;
  --bg-secondary: #ffffff;
  --card-background: #111111;
  --bg-secondary-two: #f4f4f4;
  --shadow: 0 2px 10px rgba(95, 95, 95, 0.2);
}

html {
  font-size: 100%;
  scroll-behavior: smooth;
}

/* Reset default styling */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
  color: var(--text-color);
}

/* Main styling */
body {
  background: var(--bg-primary);
  color: var(--text-color);
  font-family: "Raleway", sans-serif;
  line-height: 1.5;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  background: var(--bg-primary);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 20;
  height: 80px;
  width: 100%;
}

.navbar .nav-menu {
  display: flex;
  align-items: center;
  background: var(--bg-primary);
}

.navbar .nav-link {
  margin: 0 1rem;
  font-size: 0.8rem;
  font-weight: var(--weight-semibold);
}

.navbar #logo img {
  display: block;
  width: 40px;
}

.navbar .btn {
  margin-right: 1.5rem;
}

.fas.fa-arrow-right {
  margin-left: 0.5rem;
  font-size: 0.9rem;
}

/* hamburger */
.hamburger {
  margin-bottom: 0.1rem;
  display: none;
}

.bar {
  display: block;
  width: 23px;
  height: 3px;
  margin: 4px auto;
  transition: all 0.3s ease-in-out;
  border-radius: 30px;
  background-color: var(--bg-secondary);
}

/* Hero section */
#hero {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.profile-image {
  width: 260px;
  height: auto;
  border-radius: 50%;
  animation: bounce 1s infinite alternate;
}

@keyframes bounce {
  from {
    transform: translateY(0px);
  }

  to {
    transform: translateY(-10px);
  }
}

.division {
  width: 100%;
  height: 2px;
  background-color: var(--card-background);
  margin: 5.5rem 0;
}
/* Projects */
#projects {
  display: flex;
  flex-direction: column;
  margin: 2rem auto 5rem;
}

#projects .btn {
  align-self: center;
  margin: 2rem 0;
}

.project {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: minmax(250px, auto);
  grid-gap: 0.9rem;
}

.card .project-bio p {
  font-size: 0.83rem;
}

.card .project-bio h3 {
  font-size: 0.9rem;
}

.project-info {
  display: flex;
  justify-content: space-between;
  opacity: 0;
  position: relative;
  transition: 0.5s ease-in-out;
}

.project-bio {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
  top: 160px;
  left: 10px;
}

/* Footer */
#footer {
  background: #111111;
}

#footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  min-height: 160px;
  text-align: center;
}

#footer a {
  font-size: 0.8rem;
  color: #fff;
}

#footer a:hover {
  opacity: 0.6;
}

#footer .social {
  margin: 0.9rem 0;
}

#footer .social img {
  width: 20px;
  height: 20px;
}

#footer .social a {
  margin: 0 0.5rem;
}

#footer p {
  font-size: 0.8rem;
}

/* Responsiveness */

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

@media (max-width: 768px) {
}

@media (max-width: 670px) {
  .navbar .nav-menu {
    position: fixed;
    right: -100vw;
    top: 4.5rem;
    flex-direction: column;
    width: calc(80% - 10px);
    transition: 0.3s;
    box-shadow: var(--shadow);
    padding: 2rem;
    border-radius: 5px;
    align-items: flex-start;
  }

  .navbar .btn {
    margin: 0;
    margin-top: 1rem;
  }

  .nav-menu.active {
    right: 20px;
  }

  .nav-menu .nav-link {
    font-size: 0.9rem;
    margin: 0 0.2rem;
  }

  .nav-menu li {
    margin-bottom: 0.5rem;
    width: 100%;
  }

  .nav-menu .btn {
    width: 100%;
    text-align: center;
    margin-top: 0.5rem;
  }

  .hamburger {
    display: block;
    cursor: pointer;
    padding: 0.2rem 0.4rem;
  }

  .hamburger.active {
    border: 1px dotted gray;
  }

  .hamburger.active .bar:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active .bar:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  .hamburger.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
}

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

  .header-container .btn {
    border-radius: 5px;
    width: 80%;
  }
}
/* ============================= */
/* Skills Section */
/* ============================= */

#skills {
  display: flex;
  flex-direction: column;
  margin: 2rem auto 5rem;
}

#skills .content-text {
  text-align: center;
  margin-bottom: 2rem;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  grid-gap: 1.2rem;
  width: 100%;
}

/* Skill Card */
.skill-card {
  background: #f9f9f9; /* off-white */
  border-radius: 10px;
  box-shadow: var(--shadow);
  height: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Icons */
.skill-card i {
  font-size: 2rem;
  color: #1e40af; /* dark blue */
  margin-bottom: 0.5rem;
}

/* Skill name */
.skill-card span {
  font-size: 0.85rem;
  font-weight: var(--weight-semibold);
  color: #111111; /* always black */
}

/* Hover effect */
.skill-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.25);
}

/* Dark mode fix: keep text black */
[data-theme="dark"] .skill-card span {
  color: #111111;
}
/* Space between home and email icon */
.email-icon {
  margin-left: 0.6rem; /* increase if needed */
}
/* Certificates Section */
.certificate-container {
  display: flex;
  flex-direction: column;
  margin: 2rem auto 5rem;
}

.certificate-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}

.certificate-card {
  background: var(--card-background);
  padding: 1rem;
  border-radius: 8px;
  box-shadow: var(--shadow);
  text-align: center;

  height: 320px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.certificate-card img {
  width: 100%;
  height: 220px;
  object-fit: contain;
  display: block;
  border-radius: 5px;
}

.certificate-card h3 {
  margin-top: 0.8rem;
  font-size: 0.9rem;
  font-weight: var(--weight-semibold);
  color: var(--text-color);
}

/* Responsive */
@media (max-width: 1000px) {
  .certificate-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .certificate-grid {
    grid-template-columns: 1fr;
  }
}
/* Certificates hover effect */
.certificate-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.certificate-card:hover {
  transform: scale(1.06);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}
/* Certificate fullscreen modal */
.certificate-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  align-items: center;
  justify-content: center;
}

.certificate-modal img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.certificate-close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 40px;
  color: white;
  cursor: pointer;
}
/* Project Modal */
.project-modal {
  display: none;
  position: fixed;
  z-index: 999;
  padding-top: 60px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.8);
}

.project-modal-content {
  background-color: #fff;
  margin: auto;
  padding: 20px;
  border-radius: 8px;
  width: 80%;
  max-width: 900px;
  max-height: 80%;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.project-close {
  color: #333;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.project-close:hover {
  color: var(--primary-color);
}

.project-modal-content img {
  width: 100%;
  margin: 10px 0;
  border-radius: 5px;
}

.project-scroll h3 {
  margin-top: 15px;
}

.project-scroll table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

.project-scroll th, .project-scroll td {
  border: 1px solid #ddd;
  padding: 8px;
  text-align: left;
}

.project-scroll th {
  background-color: #f2f2f2;
}
/* ===== Project Modal Dark Mode Fix ===== */

.project-modal-content {
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

/* Text elements inside project modal */
.project-modal-content p,
.project-modal-content h2,
.project-modal-content h3,
.project-modal-content li,
.project-modal-content td,
.project-modal-content th {
  color: var(--text-primary);
}

/* Table borders in dark mode */
[data-theme="dark"] .project-modal-content table,
[data-theme="dark"] .project-modal-content td,
[data-theme="dark"] .project-modal-content th {
  border-color: #777;
}

/* Optional: softer text for descriptions */
[data-theme="dark"] .project-modal-content p {
  color: #e0e0e0;
}
/* ===== Project Modal Table Header Dark Mode Fix ===== */

[data-theme="dark"] .project-modal-content th {
  background-color: #2a2a2a;   /* dark but distinct */
  color: #ffffff;              /* visible text */
  font-weight: 600;
}

/* Optional: zebra rows for readability */
[data-theme="dark"] .project-modal-content tbody tr:nth-child(even) {
  background-color: #1f1f1f;
}

[data-theme="dark"] .project-modal-content tbody tr:nth-child(odd) {
  background-color: #252525;
}

/* ===== CERTIFICATE HARD FIX (OVERRIDE EVERYTHING) ===== */

#certificates .certificate-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
  align-items: stretch;
}

#certificates .certificate-card {
  height: 340px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

#certificates .certificate-card img {
  width: 100%;
  height: 220px;
  object-fit: contain;
  flex-shrink: 0;
}

/* ===== CERTIFICATE IMAGE NORMALIZATION (FINAL FIX) ===== */

#certificates .certificate-card {
  display: flex;
  flex-direction: column;
  height: 340px;
}

#certificates .certificate-card img {
  width: 100%;
  aspect-ratio: 4 / 3;      /* 🔑 THIS FIXES EVERYTHING */
  object-fit: contain;
  background: #fff;        /* keeps spacing clean */
  padding: 10px;
}

