/* ================ */
/* GLOBAL VARIABLES */
/* ================ */
:root {
  --bg-color: #f8fafc;
  --text-color: #334155;
  --heading-color: #1e293b;
  --primary-color: #3b82f6;
  --secondary-color: #64748b;
  --accent-color: #6366f1;
  --border-color: #e2e8f0;
  --card-bg: #ffffff;
  --button-bg: #3b82f6;
  --button-text: #ffffff;
  --button-hover-bg: #2563eb;
  --section-bg: #ffffff;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
  --rounded-sm: 0.5rem;
  --rounded-md: 1rem;
  --rounded-lg: 1.5rem;
  --transition: all 0.3s ease;
}

/* ============ */
/* BASE STYLES */
/* ============ */
*,
.tools-section .card-front,
.tools-section .card-back,
.certificate-img,
.modal {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Georgia, "Times New Roman", Times, serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

/* ============== */
/* NAVIGATION BAR */
/* ============== */
nav {
  background-color: var(--section-bg);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 1rem 0;
  border-bottom: 3px solid var(--primary-color);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: calc(1200px + 2 * 1.5rem);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.logo {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--primary-color);
}

.nav-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

nav a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.5rem 1rem;
  border-radius: var(--rounded-sm);
  transition: var(--transition);
}

nav a:hover,
nav a:focus {
  color: var(--primary-color);
  background-color: rgba(59, 130, 246, 0.1);
}

nav a.active {
  color: var(--primary-color);
  font-weight: 600;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 1.5rem;
  cursor: pointer;
}

/* ========= */
/* HEADER */
/* ========= */
header {
  text-align: center;
  padding: 5rem 0 3rem;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  margin-bottom: 3rem;
  position: relative;
  overflow: hidden;
}

header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path fill="%233b82f6" fill-opacity="0.05" d="M0,0 L100,0 L100,100 L0,100 Z" /></svg>');
  background-size: cover;
  z-index: 0;
}

.header-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.profile-image {
  position: relative;
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
  cursor: pointer;
}

.profile-img {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: fill;
  border: 5px solid white;
  box-shadow: 5px 5px 10px blue;
  transition: var(--transition);
  position: relative;
  z-index: 2;
}

.profile-video {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  height: 300px;
  border-radius: 50%;
  object-fit: fill;
  border: 5px solid white;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transition: var(--transition);
  z-index: 1;
}

/* Fullscreen video styles */
.fullscreen-video {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.fullscreen-video.active {
  opacity: 1;
  visibility: visible;
}

.fullscreen-video video {
  max-width: 90%;
  max-height: 90%;
  border: 5px solid white;
  border-radius: 10px;
}

.close-video {
  position: absolute;
  top: 20px;
  right: 20px;
  color: white;
  font-size: 30px;
  cursor: pointer;
  z-index: 1001;
}

.profile-image:hover .profile-img {
  opacity: 0;
}

.profile-image:hover .profile-video {
  opacity: 1;
}

.header-text {
  transition: var(--transition);
}

.header-social {
  transition: var(--transition);
}

.profile-image:hover ~ .header-text,
.profile-image:hover ~ .header-social {
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

header h1 {
  font-size: 3rem;
  margin-bottom: 0.5rem;
  color: var(--heading-color);
  font-weight: 700;
  line-height: 1.2;
}

header h2 {
  color: var(--primary-color);
  font-size: 1.5rem;
  font-family: Georgia, "Times New Roman", Times, serif;
  font-weight: 600;
  margin-bottom: 1rem;
}

.header-social {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

span {
  color: var(--primary-color);
  font-style: italic;
}

.header-social a {
  color: var(--primary-color);
  background: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  text-decoration: none;
}

.header-social a:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  color: white;
  background: var(--primary-color);
}

/* ============= */
/* COMMON SECTIONS */
/* ============= */
section,
.project-card,
.certificate-card,
.contact-card {
  background: var(--card-bg);
  border-radius: var(--rounded-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: var(--transition);
}

section:hover,
.project-card:hover,
.certificate-card:hover,
.contact-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.section-header {
  background: linear-gradient(
    90deg,
    var(--primary-color) 0%,
    var(--accent-color) 100%
  );
  padding: 1.5rem;
  color: white;
}

.section-header h3 {
  font-size: 1.5rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-header h3 i {
  font-size: 1.25rem;
}

.section-content {
  padding: 2rem;
  text-align: justify;
}

/* =============== */
/* ABOUT SECTION */
/* =============== */
.introduction-section p,
.journey-section p {
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

/* ================ */
/* SKILLS SECTION */
/* ================ */
.tools-section .skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.tools-section .card {
  perspective: 1000px;
  height: 180px;
  animation: floatUpDown 3s ease-in-out infinite;
}

.tools-section .card:nth-child(even) {
  animation: floatDownUp 3s ease-in-out infinite;
}

@keyframes floatUpDown {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-15px);
  }
}

@keyframes floatDownUp {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(15px);
  }
}

.tools-section .card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.6s ease;
}

.tools-section .card:hover .card-inner {
  transform: rotateY(180deg);
}

.tools-section .card-front {
  background-color: aliceblue;
  padding: 1.5rem;
}

.tools-section .card-front img {
  width: 60px;
  height: 60px;
  margin-bottom: 1rem;
  object-fit: contain;
}

.tools-section .card-front p {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--heading-color);
  text-align: center;
}

.tools-section .card-back {
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--accent-color) 100%
  );
  color: white;
  transform: rotateY(180deg);
  padding: 1.5rem;
}

.tools-section .card-front,
.tools-section .card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border-radius: var(--rounded-md);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.tools-section .level {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.tools-section .level-desc {
  font-size: 0.9rem;
  text-align: center;
  opacity: 0.9;
}

/* ================ */
/* PROJECTS SECTION */
/* ================ */

.project-grid {
  display: grid;
  gap: 2rem;
}

.project-card h4 {
  text-align: center;
  padding: 1.5rem 1.5rem 0;
  color: var(--heading-color);
  font-size: 1.25rem;
}

.project-iframe-container {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%;
  overflow: hidden;
  background: #f5f5f5;
}

.project-iframe-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.project-details {
  padding: 1.5rem;
}

.project-details h5 {
  margin: 1rem 0 0.5rem;
  color: var(--heading-color);
  font-size: 1.1rem;
}

.project-details p {
  margin-bottom: 1rem;
}

.project-details ul:not(.project-tech) {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.project-details ul:not(.project-tech) li {
  list-style-type: disc;
  color: var(--text-color);
  margin-bottom: 0.3rem;
  padding-left: 0.5rem;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin-top: 1rem;
}

.project-tech li {
  background: rgba(59, 130, 246, 0.1);
  color: var(--primary-color);
  padding: 0.25rem 0.75rem;
  border-radius: 2rem;
  font-size: 0.85rem;
  font-weight: 500;
}
.visit-btn {
  display: inline-block;
  background: var(--primary-color);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: var(--rounded-sm);
  text-decoration: none;
  font-weight: 600;
  margin-top: 1rem;
  transition: var(--transition);
  text-align: center;
}

.visit-btn:hover {
  background: var(--button-hover-bg);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.visit-btn i {
  margin-left: 0.5rem;
}

/* ===================== */
/* CERTIFICATIONS SECTION */
/* ===================== */
.certificates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.certificate-img {
  position: relative;
  cursor: pointer;
  height: 200px;
  overflow: hidden;
}

.certificate-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.certificate-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
}

.certificate-overlay i {
  color: white;
  font-size: 2rem;
}

.certificate-img:hover .certificate-overlay {
  opacity: 1;
}

.certificate-img:hover img {
  transform: scale(1.05);
}

.certificate-info {
  padding: 1.5rem;
  /* background-color: aliceblue; */
}

.certificate-info h4 {
  margin-bottom: 0.5rem;
  color: var(--heading-color);
}

.certificate-info p {
  font-size: 0.9rem;
  color: var(--secondary-color);
  margin-bottom: 0.25rem;
}

/* ================== */
/* CERTIFICATE MODAL */
/* ================== */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  overflow: auto;
}

.modal-content {
  display: block;
  margin: 5% auto;
  max-width: 80%;
  max-height: 80%;
  border: 3px solid white;
  border-radius: var(--rounded-sm);
}

#caption {
  margin: auto;
  display: block;
  width: 80%;
  max-width: 700px;
  text-align: center;
  color: white;
  padding: 10px 0;
  font-size: 1.2rem;
}

.modal-content,
#caption {
  animation: zoom 0.3s;
}

@keyframes zoom {
  from {
    transform: scale(0.1);
  }
  to {
    transform: scale(1);
  }
}

.close {
  position: absolute;
  top: 20px;
  right: 35px;
  color: white;
  font-size: 40px;
  font-weight: bold;
  transition: var(--transition);
  cursor: pointer;
}

.close:hover {
  color: var(--primary-color);
  transform: scale(1.2);
}

/* ================== */
/* CONTACT SECTION */
/* ================== */
.contact-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
}

.contact-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--accent-color) 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.25rem;
}

.contact-details h4 {
  color: var(--heading-color);
  margin-bottom: 0.25rem;
}

.contact-details p,
.contact-details a {
  color: var(--secondary-color);
  text-decoration: none;
  transition: var(--transition);
}

.contact-details a:hover {
  color: var(--primary-color);
}

/* ================== */
/* FOOTER */
/* ================== */
footer {
  margin-top: 20px;
  background-color: white;
  border-top: 3px solid var(--primary-color);
  color: var(--text-color);
  text-align: center;
  padding: 40px 20px;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  box-shadow: var(--shadow-md);
}

footer h2 {
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 24px;
  margin-bottom: 8px;
  color: var(--heading-color);
}

footer p {
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 14px;
  color: var(--secondary-color);
  margin-bottom: 20px;
}

.social-icons a {
  color: var(--heading-color);
  font-family: Georgia, "Times New Roman", Times, serif;
  margin: 0 12px;
  font-size: 22px;
  transition: var(--transition);
}

.social-icons a:hover {
  color: var(--primary-color);
  transform: scale(1.2);
}

footer small {
  display: block;
  margin-top: 25px;
  font-size: 13px;
  color: var(--secondary-color);
}
/* ============== */
/* RESPONSIVENESS */
/* ============== */
@media (max-width: 992px) {
  .tools-section .skills-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }

  .certificates-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    background: var(--section-bg);
    position: absolute;
    top: 100%;
    left: 0;
    padding: 1rem;
    box-shadow: var(--shadow-md);
    z-index: 99;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-container {
    position: relative;
    padding: 0.5rem 1.5rem;
  }

  header h1 {
    font-size: 2.25rem;
  }

  header h2 {
    font-size: 1.25rem;
  }

  .introduction-section p,
  .journey-section p {
    font-size: 0.9rem;
  }

  .tools-section .skills-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
  }

  .project-grid {
    gap: 1.5rem;
  }

  .project-card h4 {
    font-size: 1.1rem;
  }

  .certificates-grid {
    grid-template-columns: 1fr;
  }

  .certificate-img {
    height: 250px;
  }

  .modal-content {
    max-width: 95%;
    max-height: 95%;
  }

  #caption {
    font-size: 1rem;
    width: 95%;
  }

  .close {
    top: 15px;
    right: 25px;
    font-size: 30px;
  }
}

@media (max-width: 576px) {
  .container {
    padding: 0 1rem;
  }

  header {
    padding: 3rem 0 2rem;
  }

  header h1 {
    font-size: 2rem;
  }

  .profile-img,
  .profile-video {
    width: 150px;
    height: 150px;
  }

  .tools-section .skills-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  }

  .tools-section .card {
    height: 160px;
  }

  .tools-section .card-front img {
    width: 50px;
    height: 50px;
  }

  .tools-section .card-front p {
    font-size: 1rem;
  }
}
