/* ==============================
   CSS FOR PORTFOLIO
   ============================== */

html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

body {
  background: linear-gradient(-45deg, #E0E7FF, #EEF2FF, #F9FAFB, #E0E7FF);
  background-size: 400% 400%;
  animation: gradientShift 12s ease infinite;
  will-change: background-position;
  backface-visibility: hidden; 
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

img, video {
  max-width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s ease;
  cursor: pointer;
}

img:hover, video:hover {
  transform: scale(1.1);
}

/* Prevent hover animation on portrait image */
.jack:hover {
  transform: none;
  transition: none;
}

/* ==============================
   HEADER & NAV
   ============================== */

header { 
  display: flex; 
  flex-direction: column; 
  align-items: center;
  padding: 0.5rem; 
  gap: 1rem; 
  font-size: 1.5rem; 
  background: rgba(249, 250, 251, 0.95); 
  backdrop-filter: blur(8px); 
}
  
nav {
  text-align: center;
  padding: 1rem 0;
}

nav ul {
  display: inline-flex;
  gap: 3rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

nav ul li a {
  color: #111827;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: 0.3px;
  transition: color 0.3s ease, transform 0.2s ease;
}

nav ul li a:hover {
  color: #2563EB; 
  transform: scale(1.05);
}

nav ul li a:active {
  color: #1E40AF;
  font-weight: bold;
}

/* ==============================
   HERO SECTION
   ============================== */

/* THE HERO SECTION */
.opening {
  background: linear-gradient(to bottom right, #F9FAFB, #EEF2FF);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 1rem 0 3rem 0;
  color: #1E293B;
  font-family: 'Montserrat', sans-serif;
}

h1 {
  color: #111827;
}

.tagline {
  color: #6B7280;
  font-style: italic;
  margin-bottom: 1.5rem;
}

.about {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap; 
  gap: 2rem;
  max-width: 1100px;
  margin: 0 auto;
  text-align: left;
  opacity: 0; 
  animation: heroFloatIn 1.2s ease-out forwards;
  animation-delay: 0.3s;
}

@keyframes heroFloatIn {
  0% {
    opacity: 0;
    transform: translateY(40px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.about-text {
  flex: 1 1 500px;
}

.about-text p {
  color: #374151;
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.about-text h1 {
  color: #111827;
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.about img {
  flex: 0 1 300px;
  max-width: 300px;
  height: auto;
  border-radius: 25%;
  object-fit: cover;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-button {
  background-color: #2563EB;
  color: #FFFFFF;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.hero-button:hover {
  background-color: #1E40AF;
  transform: translateY(-2px);
}

.hero-links {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.hero-links a {
  color: #6B7280;
  text-decoration: none;
  font-size: 1.5rem;
  transition: color 0.3s ease;
}

.hero-links a:hover {
  color: #06B6D4;
}

/* ==============================
   SKILLS SECTION
   ============================== */

.skills-section h2 {
  text-align: center;
  font-size: 3rem;
  margin-bottom: 3rem;
  color: #1E293B;
}

.skills-section {
  text-align: center;
  margin: 4rem 0;
  font-family: 'Montserrat', sans-serif; 
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 30px;
  max-width: 700px;
  margin: 2rem auto;
}

.skill {
  position: relative;
  font-size: 65px;
  color: #333;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.skill:hover {
  transform: translateY(-6px);
}

.skill img,
.skill i {
  width: 65px;      
  height: 65px;      
  object-fit: contain;
  display: block;
  margin: 0 auto;
  min-width: 0;     
  min-height: 0;  
}

.icon-img {
  display: block;
  margin: 0 auto;
}

.tooltip {
  position: absolute;
  bottom: -35px;
  left: 50%;
  transform: translateX(-50%);
  background: black;
  color: white;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 20px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.skill:hover .tooltip {
  opacity: 1;
}

@media (max-width: 600px) {
  .skill {
    font-size: 40px; 
  }

   .skill img {
    width: 45px;
    height: 45px;
  }

  .tooltip {
    opacity: 1 !important;
    position: static;
    transform: none;
    background: none;
    color: #333;
    padding: 0;
    margin-top: 8px;
    font-size: 14px;
    white-space: normal;
    text-align: center;
  }
}

/* ==============================
   MAIN PROJECTS
   ============================== */

.projects { 
  max-width: 1100px; 
  margin: 4rem auto; 
  padding: 0 1rem; 
  font-family: 'Montserrat', sans-serif; 
} 

.projects h2 { 
  text-align: center; 
  font-size: 2.2rem; 
  color: #111827; 
  margin-bottom: 3rem; 
} 

.project { 
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  gap: 2rem; 
  margin-bottom: 4rem; 
} 

.project-text { 
  flex: 1; 
} 

.project-text h3 { 
  font-size: 1.8rem; 
  color: #1E293B; 
  margin-bottom: 1rem; 
} 

.project-text p { 
  color: #374151; 
  font-size: 1.1rem;
  line-height: 1.6; 
  margin-bottom: 1.5rem; 
} 

.project-link { 
  display: inline-block; 
  background-color: #2563EB;
  color: #FFFFFF;
  padding: 0.6rem 1.2rem;
  border-radius: 0.5rem;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.3s ease, transform 0.2s ease; 
} 

.project-link:hover {
  background-color: #1E40AF; 
  transform: translateY(-2px); 
} 

/* Slideshow section */ 

.project-slideshow { 
  flex: 1; 
  position: relative; 
  width: 100%; 
  max-width: 500px; 
  aspect-ratio: 16 / 9; 
  overflow: hidden;
  border-radius: 1rem; 
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1); 
}

.project-slideshow img {
  width: 100%; 
  height: 100%; 
  object-fit: contain; 
  position: absolute; 
  inset: 0; 
  opacity: 0; 
  transition: opacity 1s ease-in-out; 
} 

.project-slideshow img.active { 
  opacity: 1; 
}

/* ==============================
   OTHER PORTFOLIO PROJECTS
   ============================== */

#portfolio {
  background: linear-gradient(to bottom right, #F9FAFB, #EEF2FF);
  padding: 4rem 1rem;
  font-family: 'Montserrat', sans-serif;
}

#portfolio h2 {
  text-align: center;
  font-size: 3rem;
  margin-bottom: 3rem;
  color: #1E293B;
}

.portfolio-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2rem;
  margin: 0 auto 3rem auto;
  max-width: 1480px;
}

.project-card {
  flex: 1 1 300px;
  max-width: 300px;
  text-align: center;
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: visible; 
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.15);
}

.project-card video,
.project-card img {
  width: 100%;
  aspect-ratio: 1 / 1; 
  object-fit: cover;
  border-bottom: 2px solid #E5E7EB;
  transition: transform 0.3s ease;
  display: block;
  border-top-left-radius: 1rem;
  border-top-right-radius: 1rem;
}

.project-card:hover video,
.project-card:hover img {
  transform: scale(1.05);
}

.project-card a {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.project-title {
  color: #1E293B;
  font-weight: 600;
  margin: 0.75rem 0 1rem 0;
  font-size: 1.25rem;
  transition: color 0.3s ease;
}

.project-card:hover .project-title {
  color: #2563EB;
}

/* ==============================
   CERTIFICATIONS
   ============================== */

#certifications {
  background: linear-gradient(to bottom right, #EEF2FF, #E0E7FF);
  padding: 4rem 1rem;
  text-align: center;
  font-family: 'Montserrat', sans-serif;
}

#certifications h2 {
  font-size: 2.5rem;
  color: #111827;
  margin-bottom: 2.5rem;
}

.certificates {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.certificate-card {
  background: white;
  border-radius: 1rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  width: 300px;
}

.certificate-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.certificate-card p {
  background: white;
  color: #1E293B;
  font-weight: 600;
  padding: 1rem 0;
  font-size: 1.1rem;
}

.certificate-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

#lightbox {
  display: none;
  position: fixed;
  z-index: 9999;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(17, 25, 40, 0.8);
  justify-content: center;
  align-items: center;
}

#lightbox img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 1rem;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  border: 3px solid white;
}

#lightbox .close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  font-size: 2.5rem;
  color: white;
  cursor: pointer;
  transition: transform 0.2s ease;
}

#lightbox .close:hover {
  transform: scale(1.1);
}

/* ==============================
   FOOTER / CONTACT
   ============================== */

footer#contact {
  background: linear-gradient(to bottom right, #EEF2FF, #E0E7FF);
  color: #1E293B;
  padding: 4rem 1rem;
  text-align: center;
  font-family: 'Montserrat', sans-serif;
  border-top: 2px solid #E5E7EB;
}

.footer-container {
  max-width: 800px;
  margin: 0 auto;
}

footer h2 {
  font-size: 2.2rem;
  margin-bottom: 0.8rem;
  color: #111827;
}

.footer-subtext {
  color: #6B7280;
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.footer-links a {
  text-decoration: none;
  color: #1E293B;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: white;
  padding: 0.8rem 1.2rem;
  border-radius: 0.75rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.footer-links a:hover {
  background: #2563EB;
  color: white;
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.3);
}

.footer-links i {
  font-size: 1.4rem;
}

footer .copyright {
  font-size: 0.9rem;
  color: #6B7280;
  margin-top: 1.5rem;
}

/* ==============================
   MEDIA QUERIES
   ============================== */

/* Large Screens (≥1200px) */
@media (min-width: 1200px) {
  .about {
    max-width: 1200px;
  }

  .projects {
    max-width: 1200px;
  }

  .portfolio-grid {
    max-width: 1400px;
  }
}

/* Tablets / Small Laptops */
@media (max-width: 1024px) {
  nav ul {
    gap: 2rem;
    flex-wrap: wrap;
  }

  header {
    font-size: 1.2rem;
  }

  .about {
    flex-direction: column;
    align-items: center;
    padding: 1rem 2rem;
    text-align: center;
  }

  .about-text {
    max-width: 700px;
  }

  .project {
    flex-direction: column;
    text-align: center;
  }

  .project.reverse {
    flex-direction: column;
  }

  .project-slideshow {
    max-width: 600px;
  }

  #portfolio h2 {
    font-size: 2.5rem;
  }

  .portfolio-grid {
    justify-content: center;
  }

  .certificate-card {
    width: 260px;
  }

  #contact {
    font-size: 1.2rem;
  }
}

/* Tablets / Large Phones */
@media (max-width: 768px) {
  nav ul {
    flex-direction: column;
    gap: 1rem;
  }

  body {
    animation: none;
    background: linear-gradient(#E0E7FF, #F9FAFB);
  }
   
  header {
    font-size: 1.1rem;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 2.2rem;
  }

  .tagline {
    font-size: 1rem;
  }

  .about {
    flex-direction: column;
    align-items: center;
    padding: 1rem;
  }

  .project {
    flex-direction: column;
    text-align: center;
  }

  .project-text h3 {
    font-size: 1.5rem;
  }

  .project-text p {
    font-size: 1rem;
  }

  .project-slideshow {
    max-width: 100%;
  }

  .portfolio-grid {
    flex-direction: column;
    align-items: center;
  }

  .project-card {
    max-width: 280px;
  }

  .certificates {
    flex-direction: column;
    align-items: center;
  }

  .certificate-card {
    width: 85%;
  }

  footer#contact {
    padding: 3rem 1rem;
  }

  .footer-links {
    flex-direction: column;
    gap: 1rem;
  }
}

@media (max-width: 678px) {
  .portfolio-grid {
    flex-direction: column;
    align-items: center;
  }

  .project-card {
    width: 100%;
    max-width: 300px;
  }

  .project-card img,
  .project-card video,
  .penguinvideo {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 10px;
    border: 2px solid #E5E7EB;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    display: block;
  }

  .project-card a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .project-title {
    font-size: 1.2rem;
    margin-top: 0.75rem;
    color: #1E293B;
  }
}

/* Small Phones ===== */
@media (max-width: 480px) {
  body {
    font-size: 0.95rem;
  }

  nav ul {
    gap: 0.5rem;
  }

  h1 {
    font-size: 1.7rem;
  }

  h2 {
    font-size: 1.8rem;
  }
 
  .about-text p {
    font-size: 1rem;
  }

  .hero-button {
    padding: 0.6rem 1.2rem;
    font-size: 1rem;
  }

  .project-text h3 {
    font-size: 1.3rem;
  }

  .project-text p {
    font-size: 0.95rem;
  }

  .project-slideshow {
    border-radius: 0.75rem;
  }

  .portfolio-section h3 {
    font-size: 1.5rem;
  }

 .project-card {
    flex: 1 1 100%; /* one per row */
  }

  .project-title {
    font-size: 1.1rem;
  }

  .project-card img,
  .penguinvideo {
    width: 260px;
    height: 260px;
  }

  .certificate-card {
    width: 90%;
  }

  #lightbox img {
    max-width: 95%;
    max-height: 85%;
  }

  footer#contact h2 {
    font-size: 1.6rem;
  }

  .footer-subtext {
    font-size: 0.95rem;
  }

  .footer-links a {
    font-size: 1rem;
    padding: 0.6rem 1rem;
  }

  footer .copyright {
    font-size: 0.8rem;
  }
}

@supports (-webkit-overflow-scrolling: touch) {
  header {
    backdrop-filter: blur(4px); /* reduce blur for Safari */
  }
  body {
    animation: none;
    background: linear-gradient(#E0E7FF, #F9FAFB);
  }
}

@media (min-width: 769px) {
  html {
    scroll-behavior: smooth;
  }
}

/* ==============================
   EASTER EGGS
   ============================== */

#progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  background: #2563EB;
  width: 0%;
  z-index: 9999;
}

#confetti-name {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 3rem;
  color: #111827;
  cursor: pointer;
  transition: transform 0.2s ease;
}

#confetti-name:hover {
  transform: scale(1.05);
}



