* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  background: #fff;
  color: #111;
  transition: background 0.3s, color 0.3s;
  line-height: 1.6;
  padding-bottom: 4rem;
}

a {
  color: inherit;
  text-decoration: none;
}

/* About Link */
#aboutLink {
  color: #000;
  background-color: transparent;
  font-weight: 600;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  transition: background-color 0.3s;
}

#aboutLink:hover {
  background-color: #333;
  color: #fff;
}

/* About Section Overlay */
.about-section {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backdrop-filter: blur(8px);
  background-color: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-50px);
  transition: opacity 0.5s ease, transform 0.5s ease, visibility 0.5s;
}

.about-section.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.about-content {
  background-color: rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 2rem;
  border-radius: 16px;
  width: 80%;
  max-width: 600px;
  backdrop-filter: blur(20px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  text-align: left;
  position: relative;

  /* Text styling */
  font-family: 'Inter', sans-serif;
  font-size: 1.1rem; /* increase size */
  line-height: 1.7;   /* improve spacing */
  font-weight: 600;   /* semi-bold for better legibility */
}


.about-content p {
  margin-bottom: 1.5rem;
  font-size: 1.15rem;
  line-height: 1.8;
  font-weight: 600;
  word-spacing: 0.05rem;
}

.close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 1.5rem;
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
}

/* Dark Mode */
.dark-mode {
  background-color: #111;
  color: #eee;
}

.dark-mode nav a,
.dark-mode #aboutLink {
  color: #eee;
}

.dark-mode .about-content {
  background-color: rgba(0, 0, 0, 0.3);
}

.dark-mode .image-block p,
.dark-mode .contact p {
  color: #aaa;
}


/* Header */
.header {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
}

.header nav {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.header button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
}

/* Intro */
.intro {
  max-width: 1200px;
  margin: 3rem auto 4rem;
  padding: 0 1.5rem;
}

.intro h1 {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.3;
}

/* Portfolio Grid */
.portfolio-pairs {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 4rem;
}

.pair {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.image-block {
  flex: 1 1 45%;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: transform 0.2s ease, box-shadow 0.3s ease;
}

.image-block img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center;
  border-radius: 20px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.image-block:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.15);
}

.image-block h3 {
  font-weight: 600;
  font-size: 1.1rem;
}

.image-block p {
  font-size: 0.95rem;
  color: #555;
}

/* intro text */

@keyframes slideIn {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.slide-in {
  animation: slideIn 1s ease-out forwards;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .slideup-card {
    width: 45%; /* 2 per row on tablets */
  }
}

@media (max-width: 600px) {
  .slideup-card {
    width: 100%; /* 1 per row on mobile */
  }
}



/* About and Contact Sections */
.about, .contact {
  max-width: 700px;
  margin: 4rem auto 2rem;
  padding: 0 1.5rem;
}

.contact p {
  font-size: 0.9rem;
  color: #777;
}

.contact h2 {
  font-size: 1.8rem;
  font-weight: 800;
  cursor: pointer;
}

/* Footer */
footer {
  text-align: center;
  font-size: 0.85rem;
  color: #999;
  margin-top: 4rem;
}

/* Copy feedback */
.copied-text {
  display: inline-block;
  font-size: 0.9rem;
  color: green;
  opacity: 0;
  transform: translateY(0.25rem);
  transition: opacity 0.3s ease;
  margin-left: 1rem;
}

.copied-text.visible {
  opacity: 1;
}

/* Flip Section */
.flip-section {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
}

.flip-card,
.slideup-card {
  width: 22%;
  aspect-ratio: 4 / 3;
  margin: 1%;
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  perspective: 1000px;
  transform: scale(1.03);
  box-shadow: 0 8px 30px rgba(0,0,0,0.6);
}


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

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

.flip-front,
.flip-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
}

.flip-front img,
.slideup-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 20px;
  display: block;
}

.flip-back {
  background-color: #fff;
  color: black;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  text-align: left;
  transform: rotateY(180deg);
  padding-bottom: 4.2rem;
    padding-left: 1.2rem;
    padding-right: 1.2rem;
}




/* Slide-Up Section */
.overlay {
  position: absolute;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  width: 100%;
  padding: 10px 12px;
  text-align: left;
  font-size: 0.85rem;
  line-height: 1.4;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.slideup-card:hover .overlay {
  transform: translateY(0);
}

.overlay h3 {
  margin: 0 0 4px;
  font-size: 1rem;
  font-weight: 600;
}

.overlay .tools {
  font-size: 0.75rem;
  color: #ddd;
  margin-top: 6px;
}


.slideup-section {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
}

.slideup-card {
  position: relative;
}

.slideup-card img {
  transition: transform 0.3s ease;
}

.slideup-card:hover img {
  transform: scale(1.1);
}

.overlay {
  position: absolute;
  bottom: 0;
  background-color: rgb(0 0 0 / 85%);
  color: white;
  width: 100%;
  text-align: left;
  padding: 10px;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.slideup-card:hover .overlay {
  transform: translateY(0);
}

/* Slide Load More Section */
.hidden {
  display: none;
}

.load-more {
  text-align: center;
  margin: 2rem 0;
}

#loadMoreWebsites {
  font-size: 2rem;
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
}

/* Email Button */
.email-btn {
  background-color: #333;
  color: #fff;
  padding: 1rem 2rem;
  font-size: 1.2rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
  display: inline-block;
  transition: background-color 0.3s;
}

.email-btn:hover {
  background-color: #555;
}

/* Titles on top of images */
.image-title {
  text-align: center;
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

/* Contact Fade-In */
.fade-in {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1s ease, transform 1s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Section Titles */
.section-title {
  text-align: center;
  font-size: 2.2rem;
  font-weight: 800;
  margin: 80px 0 30px;
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.section-title.visible {
  opacity: 1;
  transform: scale(1);
}

.sub-title {
  text-align: center;
  font-size: 1rem;
  color: #888;
  margin-top: 0.5em;
  margin-bottom: 0.2em;
}

.main-title {
  text-align: center;
  font-size: 1.25rem;
  font-weight: bold;
}


@media (max-width: 768px) {
  .flip-card,
  .slideup-card {
    width: 48%;
    margin-bottom: 2rem;
  }
}

@media (max-width: 480px) {
  .flip-card,
  .slideup-card {
    width: 80%;
  }
}


@media (max-width: 600px) {
  .about-content {
    max-height: 90vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    font-size: 1rem;
    line-height: 1.7;
    font-weight: 500;
    padding: 1.5rem;
  }
  



  .about-content::-webkit-scrollbar {
    width: 6px;
  }

  .about-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
  }

  .about-section {
    align-items: flex-start;
    padding-top: 2rem;
  }

  .close-btn {
    position: sticky;
    top: 0.5rem;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 10;
  }
}
