/*
  style.css
  Main stylesheet for Harshil's Portfolio Website
  Organized by: Header/Navbar, Sections, Projects, About, Footer, Animations, Responsive Styles
*/

/* =====================
   Header & Navigation
   ===================== */
header,
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  background: #fbf9f6cc;
  z-index: 1000;
  font-size: 1.25rem;
  box-sizing: border-box;
  transition: top 0.3s;
}
.logo,
.header-logo {
  font-weight: bold;
  font-size: 1.25rem;
  color: #222;
  letter-spacing: 2px;
}
header,
.main-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  padding: 28px 48px 18px 48px;
  background: #fbf9f6cc;
  z-index: 1000;
  box-sizing: border-box;
  transition: top 0.3s;
}

.header-logo {
  flex: 0 0 auto;
  margin-right: auto;
}
.header-nav {
  flex: 0 0 auto;
  margin-left: auto;
}
.navbar a:hover,
.header-nav ul li a:hover {
  color: #007bff;
  transform: scale(1.1);
}

.header-nav ul {
  display: flex;
  flex-direction: row;
  gap: 18px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.header-nav ul li a {
  color: #222;
  text-decoration: none;
}

/* Ensure horizontal layout for all screen sizes */
@media (max-width: 576px) {
  .header-nav ul {
    flex-direction: row !important;
    justify-content: flex-end;
    gap: 12px;
  }
  .header-nav ul li a {
    color: #222 !important;
  }
}
@media (max-width: 400px) {
  .header-nav ul {
    flex-direction: row !important;
    gap: 8px;
  }
  .header-nav ul li a {
    color: #222 !important;
  }
}

/* =====================
   Base Styles
   ===================== */
body {
  background: #fbf9f6;
  margin: 0;
  font-family: "Segoe UI", "Roboto", Arial, sans-serif;
  overflow-x: hidden;
  padding-top: 70px;
}

/* =====================
   Home & GIF Images
   ===================== */
#about-gif,
#img1 {
  display: block;
  margin: 0 auto 0 auto;
  height: 300px;
  width: auto;
  border-radius: 20px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.18);
  animation: bounceIn 1.2s;
}

/* =====================
   Section Layouts
   ===================== */
.section {
  min-height: 60vh;
  padding: 80px 0 40px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: fadeIn 1.2s;
}
.home-section {
  background: #fbf9f6;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px 0 20px 0;
}

/* =====================
   Headings & Text
   ===================== */
h1 {
  color: #222;
  text-align: center;
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: 1px;
  animation: fadeInUp 1.2s;
  font-family: "Lucida Sans", "Segoe UI", Arial, sans-serif;
}
h3 {
  text-align: center;
  font-style: italic;
}
#p1 {
  color: #444;
  text-align: center;
  font-size: 1.2rem;
  margin: 0;
  animation: fadeInUp 1.4s;
}
#p2 {
  text-align: center;
  margin-left: 100px;
  margin-right: 100px;
}

/* =====================
   Projects Section
   ===================== */
.projects-section h2 {
  font-size: 2rem;
  margin-bottom: 32px;
  color: #222;
  text-shadow: 1px 1px 8px #eee;
  margin-top: 15px;
}
.projects-list {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  justify-content: center;
}
.project-card {
  background: #f7f7f7;
  border-radius: 18px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  padding: 32px 24px;
  min-width: 220px;
  max-width: 260px;
  transition: transform 0.4s, box-shadow 0.4s;
  cursor: pointer;
  opacity: 0;
  transform: translateY(40px);
  text-align: center;
}
.project-card.show {
  opacity: 1;
  transform: translateY(0);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.project-card:hover {
  transform: scale(1.07) translateY(-20px);
  box-shadow: 0 12px 40px rgba(0, 123, 255, 0.25);
}

/* =====================
   About Section
   ===================== */

.about-section {
  background: #fbf9f6;
  text-align: center;
}
.about-content {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: center;
  gap: 48px;
  width: 80%;
  margin: 0 auto;
}
.about-text {
  flex: 2;
  font-size: 1.1rem;
  color: #333;
  line-height: 1.7;
  margin-bottom: 8px;
}
.about-photo {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  background: #fbf9f6;
  border-radius: 18px;
  min-width: 200px;
  min-height: 220px;
}
.upload-label {
  font-size: 1rem;
  color: #007bff;
  margin-bottom: 12px;
  cursor: pointer;
  font-weight: 500;
}
#upload-photo {
  margin-bottom: 16px;
}
#preview img {
  max-width: 180px;
  border-radius: 15px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

/* =====================
   Footer Styles
   ===================== */
.footer {
  background: #fbf9f6;
  color: #000;
  text-align: center;
  padding: 32px 0 16px 0;
  margin-top: 48px;
  animation: fadeInUp 1.2s;
}
.footer-links {
  margin-bottom: 16px;
}
.footer-icon {
  color: #000;
  font-size: 1.7rem;
  margin: 0 18px;
  transition: color 0.3s, transform 0.3s;
}
.footer-icon:hover {
  color: #007bff;
  transform: scale(1.2);
}

/* =====================
   Animations
   ===================== */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.7);
  }
  60% {
    opacity: 0;
    transform: scale(1.1);
  }
  80% {
    transform: scale(0.95);
  }
  100% {
    transform: scale(1);
  }
}
.animate {
  opacity: 0;
  transform: translateY(32px) scale(0.98);
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.animate.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =====================
   Responsive Styles
   ===================== */
@media (max-width: 1200px) {
  .main-header {
    padding: 20px 48px;
  }
  .about-content {
    width: 85%;
  }
}
@media (max-width: 992px) {
  .main-header {
    padding: 20px 24px 12px 24px;
  }
  .about-content {
    flex-direction: column;
    text-align: center;
    width: 90%;
  }
  .projects-list {
    gap: 24px;
  }
  .project-card {
    flex: 1 1 calc(50% - 20px);
    max-width: 100%;
  }
  .about-photo img {
    max-width: 100%;
    height: auto;
  }
}
@media (max-width: 768px) {
  .main-header {
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 12px 10px;
  }
  .about-content {
    gap: 24px;
  }
  .project-card {
    flex: 1 1 100%;
  }
  .projects-section h2 {
    font-size: 1.8rem;
    margin-bottom: 24px;
  }
  h1 {
    font-size: 2rem;
    margin-bottom: 10px;
  }
  #p1 {
    font-size: 1.1rem;
  }
  #img1,
  #about-gif {
    height: auto;
    max-width: 100%;
    margin-bottom: 16px;
  }
  .about-photo img {
    max-width: 80%;
  }
  .section {
    padding: 40px 0 20px 0;
  }
  #about-gif {
    height: 220px;
  }
}
@media (max-width: 576px) {
  .main-header {
    padding: 12px 12px 8px 12px;
  }
  .logo {
    font-size: 1rem;
  }
  .project-card {
    padding: 14px;
    font-size: 0.9rem;
    width: 90%;
    max-width: 320px;
    min-height: 160px;
    border-radius: 12px;
  }
  h1 {
    font-size: 1.6rem;
  }
  #p1 {
    font-size: 1rem;
  }
  .footer {
    padding: 24px 0 12px 0;
  }
  .footer-icon {
    font-size: 1.5rem;
    margin: 0 12px;
  }
  .projects-list {
    flex-direction: column;
    gap: 16px;
    align-items: center;
  }
  #img1,
  #about-gif {
    max-width: 80%;
    height: auto;
    margin: 10px auto;
    display: block;
  }
  .about-text p {
    margin-bottom: 10px;
  }
  .projects-section {
    margin-top: 10px;
    padding-top: 0;
  }
  .nav-links {
    flex-direction: row;
    justify-content: center;
    width: 100%;
    margin-top: 8px;
    gap: 20px;
    font-size: 0.85rem;
  }
}
img,
video {
  max-width: 100%;
  height: auto;
}
