/* === RESET === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Poppins", sans-serif;
  color: #1a1a1a;
  background: #fff;
  line-height: 1.6;
}

/* === HEADER === */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 5%;
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* Logo */
.logo {
  font-weight: 700;
  font-size: 1.5rem;
  color: #6a0dad;
  text-decoration: none;
  cursor: pointer;
  position: relative;
  z-index: 1001;
}

.logo:hover {
  opacity: 0.85;
}

.logo a {
  color: #6a0dad;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.5rem;
}

.logo a:visited {
  color: #6a0dad;
}

.logo a:hover {
  color: #520a9b;
  text-decoration: none;
}


/* Base nav links */
header nav a {
  position: relative;
  margin-left: 1.5rem;
  text-decoration: none;
  color: #333;
  font-weight: 500;
  transition: color 0.3s ease;
}

header nav a:hover {
  color: #6a0dad;
}

header nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0%;
  height: 2px;
  background: linear-gradient(90deg, #6a0dad, #b36bff);
  box-shadow: 0 0 8px rgba(106, 13, 173, 0.6);
  transition: width 0.4s ease, box-shadow 0.3s ease;
}

header nav a:hover::after {
  width: 100%;
}

/* --- HAMBURGER MENU --- */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 22px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 999;
  position: absolute;
  right: 1.5rem;
  top: 1.5rem;
}

.bar {
  height: 3px;
  width: 100%;
  background-color: #6a0dad;
  border-radius: 3px;
  transition: all 0.3s ease;
}

.menu-toggle.active .bar:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.menu-toggle.active .bar:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active .bar:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Responsive nav */
@media (max-width: 768px) {
  header {
    position: relative;
    padding: 1rem 5%;
  }

  .menu-toggle {
    display: flex;
  }

  nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: white;
    flex-direction: column;
    align-items: flex-start;
    padding: 1.5rem 5%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  }

  nav.show {
    display: flex;
  }

  header nav a {
    margin: 0.75rem 0;
    font-size: 1.1rem;
  }
}

/* === HERO SECTION === */
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4rem 5%;
  flex-wrap: wrap;
  gap: 2rem;
}

.hero-text {
  flex: 1;
  min-width: 280px;
}

.hero-text h1 {
  font-size: 2.5rem;
}

.hero-text span {
  color: #6a0dad;
}

.tech {
  color: #6a0dad;
  font-weight: 600;
}

.hero-text h2 {
  font-size: 1.8rem;
  margin: 0.5rem 0;
}

.hero-text p {
  margin-bottom: 1.5rem;
  max-width: 450px;
  color: #444;

}

.hero-buttons .btn {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  margin-right: 1rem;
  transition: all 0.3s ease;
}

.btn.primary {
  background: #6a0dad;
  color: #fff;
}

.btn.primary:hover {
  background: #520a9b;
}

.btn.secondary {
  border: 2px solid #6a0dad;
  color: #6a0dad;
}

.btn.secondary:hover {
  background: #6a0dad;
  color: #fff;
}

/* --- HERO IMAGE --- */
.hero-image {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 250px;
  margin-top: 1rem;

}

.hero-image img {
  width: 220px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
  border: 5px solid #6a0dad33;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  display: block;
  margin: 0 auto;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.hero-image img:hover {
  transform: scale(1.03);
  box-shadow: 0 0 25px rgba(106, 13, 173, 0.25);
}

/* --- PROJECTS --- */
.projects {
  padding: 4rem 5%;
  background: #fafafa;
}

.projects h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 2rem;
  color: #6a0dad;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.card {
  background: #fff;
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
}

.card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 8px;
  display: block;
  background-color: #fff;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease;
}

.card img:hover {
  transform: scale(1.02);
}

.card h3 {
  margin: 1rem 0 0.5rem;
  color: #333;
}

.card p {
  font-size: 0.95rem;
  margin-bottom: 1rem;
  color: #444;
}

.read-more {
  color: #6a0dad;
  text-decoration: none;
  font-weight: 600;
}

.read-more:hover {
  text-decoration: underline;
}

/* --- FOOTER --- */
footer {
  text-align: center;
  padding: 2rem 0;
  font-size: 0.9rem;
  background: #fff;
  color: #666;
  border-top: 1px solid #eee;
}

.bar {
  height: 3px;
  width: 100%;
  background-color: #6a0dad;
  border-radius: 3px;
  transition: all 0.3s ease;
}

.menu-toggle.active .bar:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.menu-toggle.active .bar:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active .bar:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* === RESPONSIVE NAVIGATION === */
@media (max-width: 900px) {
  header {
    position: relative;
    padding: 1rem 5%;
  }

  .menu-toggle {
    display: flex;
  }

  nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: white;
    flex-direction: column;
    align-items: flex-start;
    padding: 1.5rem 5%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  }

  nav.show {
    display: flex;
  }

  nav a {
    display: block;
    width: 100%;
    margin: 0.75rem 0;
    font-size: 1.1rem;
    color: #333;
    text-decoration: none;
    transition: color 0.2s ease;
  }

  nav a:hover {
    color: #6a0dad;
  }
}

.project-banner {
  display: flex;
  justify-content: center;
  margin-top: 1.5rem;
}

.banner-container {
  width: 100%;
  max-width: 900px;
  padding: 0 1rem;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  position: relative;
  isolation: isolate;
}

.banner-container img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 20px;
  display: block;
  position: relative;
  z-index: 2;
}

.banner-container::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 20px;
  background: #fff;
  z-index: 1;
}

/* --- ARTICLE --- */
.article {
  padding: 3rem 5%;
  max-width: 900px;
  margin: 0 auto;
}

.article h1 {
  color: #6a0dad;
  font-size: 2rem;
  margin-bottom: 1rem;
}

.article h2 {
  color: #6a0dad;
  font-size: 1.4rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-weight: 600;
  line-height: 1.3;
}

.article p,
.article li {
  color: #444;
  font-size: 1rem;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.article ul {
  margin-left: 1.5rem;
}

/* --- PROJECT LINKS --- */
.project-links {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 1.2rem;
  margin: 0.8rem 0 2rem;
  flex-wrap: wrap;
}

.project-links a {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: #2d2d2d;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.3s ease;
}

.project-links a:hover {
  color: #6a0dad;
}

.project-links i {
  width: 1.2em;
  height: 1.2em;
  stroke-width: 2.2;
  vertical-align: middle;
}

/* --- PROJECT GALLERY --- */
.project-gallery {
  margin-top: 3rem;
  padding: 0 5%;
}

.project-gallery h2 {
  color: #6a0dad;
  margin-bottom: 1.5rem;
  text-align: center;
  text-transform: capitalize;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  justify-items: center;
  align-items: start;
}


.gallery-grid img {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-grid img:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.gallery-grid figure {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}


figcaption {
  font-size: 0.9rem;
  color: #444;
  font-weight: 400;
  line-height: 1.5;
  text-align: left;
  max-width: 280px;
  margin-top: 0.4rem;
  padding: 0 0.3rem;
}

footer p {
  font-size: 0.9rem;
  color: #555;
  text-align: center;
}

footer p span {
  font-size: 1rem;
  vertical-align: middle;
}

/* --- PROJECT NAVIGATION --- */
.project-nav {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin: 3rem 0;
  flex-wrap: wrap;
}

.project-nav .nav-btn {
  background-color: #6a0dad;
  color: #fff;
  padding: 1rem 2rem;
  border-radius: 1rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s ease;
}

.project-nav .nav-btn:hover {
  background-color: #520a9b;
  transform: translateY(-2px);
}

/* === STYLE GUIDE INTERACTIONS === */
.btn.primary:hover {
  background: #7a20c9;
  box-shadow: 0 0 15px rgba(106, 13, 173, 0.6);
  transform: translateY(-2px);
}

.btn.secondary:hover {
  background: #6a0dad;
  color: #fff;
  box-shadow: 0 0 15px rgba(106, 13, 173, 0.4);
  transform: translateY(-2px);
}

.btn {
  transition: all 0.3s ease;
}

main section div[style*="background"] {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

main section div[style*="background"]:hover {
  transform: scale(1.05);
  box-shadow: 0 0 10px rgba(106, 13, 173, 0.4);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 18px rgba(106, 13, 173, 0.2);
  transition: all 0.3s ease;
}

/* === RESPONSIVE DESIGN === */
@media (max-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  header {
    position: relative;
    padding: 1rem 5%;
  }

  .menu-toggle {
    display: flex;
    position: absolute;
    right: 1.5rem;
    top: 1.2rem;
    cursor: pointer;
    z-index: 200;
  }

  nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: white;
    flex-direction: column;
    align-items: flex-start;
    padding: 1.5rem 5%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  }

  nav.show {
    display: flex;
  }

  nav a {
    display: block;
    width: 100%;
    margin: 0.75rem 0;
    font-size: 1.1rem;
    color: #333;
    text-decoration: none;
    transition: color 0.2s ease;
  }

  nav a:hover {
    color: #6a0dad;
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    justify-items: center;
  }

  .gallery-grid figure {
    max-width: none;
    width: 100%;
  }

  .gallery-grid img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    object-fit: contain;
  }
}


@media (max-width: 768px) {

  header {
    position: relative;
    padding: 1rem 5%;
  }

  .menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 22px;
    background: none;
    border: none;
    cursor: pointer;
    position: absolute;
    right: 1.5rem;
    top: 1.5rem;
    z-index: 999;
  }

  .bar {
    height: 3px;
    width: 100%;
    background-color: #6a0dad;
    border-radius: 3px;
    transition: all 0.3s ease;
  }

  .menu-toggle.active .bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle.active .bar:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    right: 0;
    width: 100%;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    padding: 1.5rem 5%;
    text-align: left;
    animation: slideDown 0.3s ease forwards;
  }

  .nav-links.show {
    display: flex;
  }

  .nav-links a {
    display: block;
    font-size: 1.1rem;
    color: #333;
    margin: 0.75rem 0;
    text-decoration: none;
    transition: color 0.3s ease;
  }

  .nav-links a:hover {
    color: #6a0dad;
  }

  /* Slide animation for dropdown */
  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .hero {
    flex-direction: column;
    text-align: center;
    padding: 2.5rem 1rem;
  }

  .hero-text h1 {
    font-size: 2rem;
  }

  .hero-text h2 {
    font-size: 1.3rem;
  }

  .hero-image img {
    width: 180px;
    aspect-ratio: 1 / 1;
    margin-top: 1.5rem;
  }

  .hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
  }

  .hero-buttons .btn {
    width: 80%;
    text-align: center;
  }

  .projects {
    padding: 2rem 1rem;
  }

  .project-banner img {
    max-height: 250px;
    object-fit: contain;
  }

  .projects h2 {
    font-size: 1.6rem;
  }

  .project-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .gallery-grid figure {
    max-width: 320px;
    width: 90%;
  }

  .gallery-grid img {
    height: auto;
    max-height: 450px;
  }

  figcaption {
    font-size: 0.85rem;
    line-height: 1.3;
  }

  footer {
    padding: 1rem;
    font-size: 0.8rem;
  }
}

@media (min-width: 471px) and (max-width: 768px) {
  .banner-container {
    border-radius: 20px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    isolation: isolate;

  }

  .banner-container img {
    border-radius: 20px;
    object-fit: cover;
    display: block;
  }
}

@media (max-width: 600px) {
  .banner-container {
    padding: 0 0.8rem;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-grid figure {
    max-width: 90%;
  }

  figcaption {
    font-size: 0.85rem;
    line-height: 1.3;
  }
}

@media (max-width: 480px) {
  .article h1 {
    font-size: 1.6rem;
  }

  .article h2 {
    font-size: 1.2rem;
  }

  .article p,
  .article li {
    font-size: 0.95rem;
    line-height: 1.65;
  }

  .project-links a {
    font-size: 0.95rem;
  }

  footer {
    font-size: 0.75rem;
  }
}