@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&display=swap");

/* ==========================
   GLOBAL STYLES
========================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Montserrat", sans-serif;
}

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

body {
  text-align: center;
  line-height: 1.6;   /* better readability */
  color: #272341;
  font-size: 1.6rem;  /* base size */
  font-family: "Montserrat", sans-serif;
}

h1 {
  font-weight: 700;
}

p, a {
  font-size: 1.6rem;
}

a {
  text-decoration: none;
  transition: all 0.3s ease-in-out;
}

/* ==========================
   SECTION TITLES
========================== */
.section-title {
  margin-bottom: 5rem;
  font-size: 4.4rem;
  font-weight: 700;
  letter-spacing: 1px;
}

@media (max-width: 768px) {
  .section-title {
    font-size: 3.2rem;
    margin-bottom: 3.5rem;
  }
}

/* ==========================
   COLORS & GRADIENT TEXT
========================== */
.text-color-main {
  color: #5b86e5;
  margin-left: 1rem;
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .text-color-main {
    background-image: linear-gradient(135deg, #36d1dc 0%, #5b86e5 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
  }
}

@media (max-width: 37.5em) {
  .text-color-main {
    margin: 0;
    background-image: none;
    -webkit-text-fill-color: #5b86e5;
    color: #5b86e5;
  }
}

/* ==========================
   BUTTONS
========================== */
.cta-btn {
  display: inline-block;
  position: relative;
  padding: 0.8rem 1.6rem;
  font-weight: bold;
  border-radius: 3px;
  z-index: 1;
  overflow: hidden;
  transition: all 0.6s cubic-bezier(0.19, 1, 0.22, 1);
}

.cta-btn::after {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 0;
  height: 100%;
  z-index: -1;
  background-image: linear-gradient(135deg, #36d1dc 0%, #5b86e5 100%);
  transition: all 0.6s cubic-bezier(0.19, 1, 0.22, 1);
}

.cta-btn:hover::after {
  width: 100%;
}

/* Hero Button */
.cta-btn--hero {
  color: #5b86e5;
  border: 2px solid transparent;
}
.cta-btn--hero:hover {
  color: #fff;
}

/* Resume Button */
.cta-btn--resume {
  border-radius: 0;
  color: #fff;
  border: 2px solid #fff;
}
.cta-btn--resume:hover {
  color: #36d1dc;
}

/* ==========================
   CONTAINER
========================== */
.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

@media (max-width: 75em) {
  .container { max-width: 960px; }
}
@media (max-width: 56.25em) {
  .container { max-width: 720px; }
}
@media (max-width: 37.5em) {
  .container { max-width: 540px; }
}

/* ==========================
   HERO SECTION
========================== */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 5.6rem;
}

@media (max-width: 56.25em) { #hero { justify-content: center; } }
@media (max-width: 37.5em) { #hero { padding: 0 1.6rem; } }

#hero .hero-title {
  font-size: 6rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 4rem;
}

@media (max-width: 768px) {
  #hero .hero-title {
    font-size: 3.8rem;
    line-height: 1.4;
  }
}

/* ==========================
   ABOUT SECTION
========================== */
#about {
  background: linear-gradient(135deg, #36d1dc 0%, #5b86e5 100%);
  color: #fff;
  padding: 6rem 1rem;
}

#about .about-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}

@media (max-width: 48em) {
  #about .about-wrapper {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

#about .about-wrapper__image img {
  max-width: 350px;
  width: 100%;
  height: auto;
  border-radius: 10px;
}

/* ==========================
   PROJECTS SECTION
========================== */
#projects {
  background-color: #e5e5e5;
  color: #272341;
  padding: 4rem 1rem;
}

.project-wrapper__text,
.project-wrapper__image {
  flex: 1 1 300px;
}

.project-wrapper__image img {
  width: 100%;
  height: auto;
  max-width: 450px;
  border-radius: 8px;
  margin: 0 auto;
}

/* Project Articles Spacing */
#projects article {
  margin-bottom: 6rem;     /* more space between projects */
  padding-bottom: 3rem;    /* extra breathing room */
  border-bottom: 1px solid #ccc; /* subtle divider */
}

#projects article:last-child {
  border-bottom: none;     /* remove line for last project */
  margin-bottom: 0;
  padding-bottom: 0;
}

/* Text spacing inside projects */
.project-wrapper__text {
  margin-bottom: 2rem;
}

.project-wrapper__text p {
  line-height: 1.8;        /* double spacing for readability */
  font-size: 1.6rem;
}

/* ==========================
   EXPERIENCE SECTION
========================== */
#experience article {
  margin-bottom: 6rem;     /* extra space between experiences */
  padding-bottom: 3rem;
  border-bottom: 1px solid #ccc; /* subtle divider */
}

#experience article:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

#experience .resume-wrapper__text p {
  line-height: 1.8;        /* double spacing */
  font-size: 1.6rem;
  margin-bottom: 1.5rem;
}

/* ==========================
   SMART HARVEST GALLERY
========================== */
#smartHarvestGallery.overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.95);
  display: none;               /* start hidden; JS sets inline style display='flex' when opened */
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  box-sizing: border-box;
}

/* wrapper keeps a fixed viewport for each slide */
.gallery-wrapper {
  width: 92%;
  max-width: 1100px;
  overflow: hidden;
  margin: 0 auto;
}

/* the row of images we translate left/right */
.gallery-slider {
  display: flex;
  transition: transform 350ms cubic-bezier(.22,.95,.21,1);
  will-change: transform;
  touch-action: pan-y; /* allows vertical page scroll outside slider */
  cursor: grab;
}

/* dragging cursor */
.gallery-slider.grabbing {
  cursor: grabbing;
}

/* each image occupies full wrapper width */
.gallery-slider img {
  min-width: 100%;
  width: 100%;
  height: auto;
  max-height: 82vh;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  border-radius: 8px;
}

/* close button in top-right */
.close-btn {
  position: fixed;
  top: 20px;
  right: 28px;
  font-size: 2.2rem;
  color: #fff;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 10000;
  padding: 0.2rem 0.6rem;
}

/* make slider responsive on small screens */
@media (max-width: 600px) {
  .gallery-wrapper { width: 98%; }
  .close-btn { right: 18px; top: 14px; font-size: 1.8rem; }
}


/* Hide scrollbar */
.gallery-wrapper::-webkit-scrollbar { display: none; }
.gallery-wrapper { -ms-overflow-style: none; scrollbar-width: none; }

/* Fixed Close Button */
.close-btn {
  position: fixed;
  top: 2rem;
  right: 2rem;
  font-size: 2rem;
  color: #fff;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 10000;
}
.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 3rem;
  color: white;
  background: rgba(0, 0, 0, 0.4);
  border: none;
  padding: 0.5rem 1rem;
  cursor: pointer;
  border-radius: 50%;
  z-index: 1001;
  transition: background 0.3s;
}

.gallery-arrow:hover {
  background: rgba(0, 0, 0, 0.7);
}

.gallery-arrow.prev {
  left: 20px;
}

.gallery-arrow.next {
  right: 20px;
}

/* Hide arrows on small screens (mobile/tablet) */
@media (max-width: 768px) {
  .gallery-arrow {
    display: none;
  }
}

/* ==========================
   MINIATURE PLAZA VIDEO OVERLAY
========================== */
#miniatureVideoOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

#miniatureVideoOverlay video {
  max-width: 90%;
  max-height: 80%;
  border-radius: 10px;
}

#miniatureVideoOverlay .close-btn {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 2rem;
  color: white;
  background: none;
  border: none;
  cursor: pointer;
}

/* ==========================
   CONTACT SECTION
========================== */
#contact .contact-wrapper {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

#contact .contact-wrapper__text {
  font-size: 1.8rem;
  margin-bottom: 2.5rem;
  line-height: 1.8;
}

#contact .cta-btn {
  font-size: 1.6rem;
  padding: 1rem 2.5rem;
  border-radius: 6px;
}

/* ==========================
   SPACING BETWEEN SECTIONS
========================== */

/* Extra spacing before Skills */
#skills {
  padding-top: 8rem;
}

/* Extra spacing before Contact */
#contact {
  padding-top: 8rem;
}

/* ==========================
   FOOTER
========================== */
.footer {
  background-color: #222;
  padding: 3rem 0;
  font-size: 1.4rem;
}

.social-links {
  margin: 2rem 0;
  gap: 2rem;
}

.social-links a {
  font-size: 2.6rem;
}

.social-links a {
  font-size: 3rem;
  margin: 1.6rem;
  display: inline-block;
  background: linear-gradient(135deg, #36d1dc 0%, #5b86e5 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent; /* fallback */
  transition: all 0.2s ease-in-out;
}

.social-links a:hover {
  transform: scale(1.1) translateY(-2px);
  opacity: 0.9;
}


/* ==========================
   UNIVERSAL RESPONSIVE IMAGES
========================== */
img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 10px;
}

/* ==========================
   MEDIA QUERIES
========================== */
@media (max-width: 768px) {
  #about .about-wrapper { grid-template-columns: 1fr; text-align: center; }
  #projects .project-wrapper__image img { width: 100%; height: auto; }
  #smartHarvestGallery .gallery-wrapper { height: 50vh; }
}

@media (max-width: 480px) {
  #hero .hero-title { font-size: 2.8rem; }
  #smartHarvestGallery .gallery-wrapper { height: 40vh; }
}
/* Project / Experience Images */
.project-img {
  max-width: 600px;  /* same as Smart Harvest / Miniature */
  width: 100%;       /* scales down on smaller screens */
  height: auto;      /* keeps aspect ratio */
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  margin-top: 1rem;
}
.skills-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center; /* center cards for smaller screens */
}

.skill-card {
  background-color: #f9fbff;
  border-radius: 14px;
  padding: 3rem 2rem;
  text-align: center;
  box-shadow: 0 6px 12px rgba(0,0,0,0.08);
  transition: transform 0.25s ease-in-out;
}

.skill-card:hover {
  transform: translateY(-8px);
}

.skill-card i {
  font-size: 3rem;  
  margin-bottom: 1.5rem;
  color: #fff; /* make icon white so it contrasts */
  background: linear-gradient(135deg, #36d1dc 0%, #5b86e5 100%);
  padding: 1.2rem;
  border-radius: 50%; /* makes it circular */
  display: inline-flex;
  align-items: center;
  justify-content: center;
}


.skill-card h3 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #222;
}

.skill-card p {
  font-size: 1.4rem;
  line-height: 1.6;
  color: #444;
}


/* Desktop/Laptop: 5 cards in a row */
@media (min-width: 1200px) {
  .skill-card {
    flex: 0 0 calc(20% - 1.5rem); /* 5 cards evenly */
  }
}

/* Tablet: 2 cards per row */
@media (max-width: 1199px) and (min-width: 769px) {
  .skill-card {
    flex: 0 0 calc(50% - 1.5rem);
  }
}

/* Mobile: 2 cards per row, last card centered if odd */
@media (max-width: 768px) {
  .skill-card {
    flex: 0 0 calc(50% - 1.5rem);
  }

  /* center last card if odd number of cards */
  .skill-wrapper .skill-card:last-child:nth-child(odd) {
    margin-left: auto;
    margin-right: auto;
  }
}

/* Extra small screens: 1 card per row */
@media (max-width: 480px) {
  .skill-card {
    flex: 0 0 100%;
  }
}

/* ==========================
   SKILL CARD COLORS (Gradients)
========================== */
.skill-card:nth-child(1) {
  background: linear-gradient(135deg, #e3f2fd, #bbdefb);
}
.skill-card:nth-child(2) {
  background: linear-gradient(135deg, #bbdefb, #90caf9);
}
.skill-card:nth-child(3) {
  background: linear-gradient(135deg, #90caf9, #64b5f6);
}
.skill-card:nth-child(4) {
  background: linear-gradient(135deg, #64b5f6, #42a5f5);
}
.skill-card:nth-child(5) {
  background: linear-gradient(135deg, #42a5f5, #1e88e5);
  color: #fff; /* white text for contrast */
}

/* ==========================
   CONTACT SECTION COLORS
========================== */
#contact {
  background: #f4f8fb; /* soft light background */
  padding: 8rem 1rem;  /* extra space */
}

#contact .cta-btn {
  background: linear-gradient(135deg, #36d1dc 0%, #5b86e5 100%);
  color: #fff;
  border: none;
  font-weight: bold;
  transition: transform 0.3s ease-in-out;
}

#contact .cta-btn:hover {
  transform: scale(1.05);
  opacity: 0.9;
}
