/* Base Styles and Variables */
:root {
  --primary: #57068c;
  --primary-light: #9023d9;
  --primary-dark: #3a045f;
  --secondary: #220045;
  --text-dark: #131313;
  --text-light: #fff;
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
  --transition: all 0.3s ease;
  --shadow: 0px 10px 20px rgba(0, 0, 0, 0.15);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Kumbh Sans", sans-serif;
}

body {
  overflow-x: hidden;
}

/* Container Utilities */
.container {
  width: 100%;
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 var(--spacing-sm);
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  margin-bottom: var(--spacing-sm);
  line-height: 1.2;
}

p {
  margin-bottom: var(--spacing-sm);
  line-height: 1.6;
}

/* Navbar Styles */
.navbar {
  height: 80px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.2rem;
  position: sticky;
  top: 0;
  z-index: 999;
  box-shadow: 0px 10px 20px 0px rgba(0, 0, 0, 0.05);
  border-bottom: 1px solid var(--primary);
  background-color: white;
  transition: var(--transition);
}

.navbar__container {
  display: flex;
  justify-content: space-between;
  height: 80px;
  z-index: 1;
  width: 100%;
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

#navbar__logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  font-size: 2.4rem;
  color: var(--primary); /* Changed to purple to match other navbar links */
  transition: var(--transition);
}

#navbar__logo:hover,
#navbar__logo:focus {
  color: var(--primary-dark);
  transform: scale(1.02);
  cursor: pointer;
}

.navbar__menu {
  display: flex;
  align-items: center;
  list-style: none;
  text-align: center;
}

.navbar__item {
  height: 80px;
  position: relative;
}

.navbar__links {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  padding: 0 var(--spacing-md);
  height: 100%;
  transition: var(--transition);
  position: relative;
  color: var(--primary) !important; /* Ensure all navbar links are purple */
  cursor: pointer; /* Explicitly set cursor to pointer */
}

.navbar__links::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 3px;
  background: var(--primary);
  transition: var(--transition);
  transform: translateX(-50%);
}

.navbar__links:hover::after,
.navbar__links:focus::after {
  width: 80%;
  height: 4px; /* Make the underline slightly thicker on hover */
  cursor: pointer;
}

.navbar__links:hover,
.navbar__links:focus {
  /* Remove background color change */
  /* background: var(--primary-dark); */
  color: var(--primary) !important; /* Keep the text color purple */
  /* Remove the font-weight: 600 that was making text bolder */
  cursor: pointer;
}

.navbar__btn {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 var(--spacing-sm);
  width: 100%;
}

.button {
  display: flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  padding: 10px 20px;
  height: 100%;
  width: 100%;
  border: none;
  outline: none;
  border-radius: 4px;
  background: var(--primary-light);
  color: var(--text-light);
  font-weight: 500;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  cursor: pointer; /* Explicitly set cursor to pointer */
}

.button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.2);
  transition: var(--transition);
}

.button:hover::before,
.button:focus::before {
  left: 100%;
  cursor: pointer;
}

.button:hover,
.button:focus {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  cursor: pointer;
}

.button:active {
  transform: translateY(0);
  box-shadow: none;
}

.navbar__toggle {
  display: none;
}

/* Mobile Navigation */
@media screen and (max-width: 960px) {
  .navbar__container {
    padding: 0 var(--spacing-sm);
  }

  .navbar__menu {
    display: grid;
    grid-template-columns: auto;
    margin: 0;
    width: 100%;
    position: absolute;
    top: -1000px;
    opacity: 0;
    transition: all 0.5s ease;
    height: auto;
    z-index: -1;
    background: var(--primary);
    left: 0; /* Ensure menu is flush with left edge */
  }

  .navbar__menu.active {
    top: 100%;
    opacity: 1;
    z-index: 99;
    height: auto;
    padding: var(--spacing-sm) 0;
  }

  #navbar__logo {
    padding-left: var(--spacing-sm);
    font-size: 2rem;
  }

  .navbar__toggle {
    display: block;
    cursor: pointer;
    position: absolute;
    top: 50%;
    right: var(--spacing-md);
    transform: translate(0, -50%);
    z-index: 10;
  }

  .navbar__toggle .bar {
    width: 25px;
    height: 3px;
    margin: 5px auto;
    transition: all 0.3s ease-in-out;
    background: var(--primary);
    display: block;
  }

  .navbar__item {
    width: 100%;
    height: auto;
  }

  .navbar__links {
    text-align: center;
    padding: var(--spacing-md);
    width: 100%;
    display: block;
    color: var(--text-light) !important;
  }

  .navbar__links::after {
    display: none;
  }

  .navbar__btn {
    padding: var(--spacing-sm) var(--spacing-md);
    width: 100%;
    display: flex;
    justify-content: center;
  }

  .button {
    width: 80%;
    height: 60px;
    margin: 0;
  }

  #mobile-menu.is-active .bar:nth-child(2) {
    opacity: 0;
  }

  #mobile-menu.is-active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  #mobile-menu.is-active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
}

/* Hero Section */
.main {
  background-color: var(--text-light);
  width: 100%;
}

.main__container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  min-height: 90vh;
  padding: var(--spacing-md);
  max-width: 1300px;
  width: 100%;
}

.main__content {
  padding-right: var(--spacing-md);
}

.main__content h1 {
  font-size: 4rem;
  background-color: var(--text-dark);
  background-image: linear-gradient(to top, var(--text-dark) 0%, var(--text-dark) 100%);
  background-size: 100%;
  -webkit-background-clip: text;
  -moz-background-clip: text;
  -webkit-text-fill-color: transparent;
  -moz-text-fill-color: transparent;
  margin-bottom: 0.5rem; /* Reduced from var(--spacing-sm) */
}

.main__content h2 {
  font-size: 2rem;
  background-color: var(--primary);
  background-image: linear-gradient(to top, var(--primary) 0%, var(--text-dark) 100%);
  background-size: 100%;
  -webkit-background-clip: text;
  -moz-background-clip: text;
  -webkit-text-fill-color: transparent;
  -moz-text-fill-color: transparent;
  margin-bottom: 0.5rem; /* Reduced from var(--spacing-sm) */
}

/* Add styles for the greeting emoji to make it match heading */
.greeting-emoji {
  width: 70px;
  height: 70px;
  margin-right: 15px;
  /* Improve vertical alignment */
  transform: translateY(-5px); /* Adjust vertical position to align with text */
}

/* Update the greeting container to properly align items */
.greeting-container {
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem; /* Reduced from var(--spacing-sm) */
}

/* Add responsive sizing for the emoji on smaller screens */
@media screen and (max-width: 768px) {
  .greeting-emoji {
    width: 50px;
    height: 50px;
    margin-right: 10px;
    transform: translateY(-3px);
  }

  /* Center the greeting container on mobile */
  .greeting-container {
    justify-content: center;
  }
}

@media screen and (max-width: 480px) {
  .greeting-emoji {
    width: 40px;
    height: 40px;
    margin-right: 8px;
    transform: translateY(-2px);
  }
}

.main__content p {
  margin: 0.5rem 0; /* Reduced from var(--spacing-sm) 0 */
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--primary);
}

.main__btn {
  font-size: 1rem;
  margin-top: 1rem; /* Reduced from var(--spacing-md) */
  padding: 14px 32px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  position: relative;
  transition: var(--transition);
  outline: none;
  background-color: var(--primary-light);
  color: white;
  overflow: hidden;
}

.main__btn a {
  position: relative;
  z-index: 2;
  color: var(--text-light);
  text-decoration: none;
  font-weight: 600;
}

.main__btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.2);
  transition: var(--transition);
}

.main__btn:hover::before,
.main__btn:focus::before {
  left: 100%;
}

.main__btn:hover,
.main__btn:focus {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.main__btn:active {
  transform: translateY(0);
  box-shadow: none;
}

.main__img--container {
  text-align: center;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

#main__img {
  height: auto;
  width: 80%;
  max-width: 500px;
  border-radius: 10px;
  transition: var(--transition);
}

#main__img:hover {
  transform: scale(1.02);
}

/* Responsive Hero Section */
@media screen and (max-width: 1024px) {
  .main__container {
    padding: var(--spacing-md) var(--spacing-sm);
  }

  .main__content h1 {
    font-size: 3.5rem;
  }

  .main__content h2 {
    font-size: 1.8rem;
  }
  .main__content p {
    font-size: 1rem;
  }
}

@media screen and (max-width: 954px) {
  .main__content h1 {
    font-size: 2.6rem;
  }

  .main__content h2 {
    font-size: 1.3rem;
  }

  .main__content p {
    font-size: 0.75rem;
  }
}

@media screen and (max-width: 768px) {
  .main__container {
    grid-template-columns: 1fr;
    padding: var(--spacing-md) var(--spacing-sm);
  }

  .main__content {
    text-align: center;
    margin-bottom: var(--spacing-md);
    padding-right: 0;
  }

  .main__content h1 {
    font-size: 2.5rem;
    margin-top: var(--spacing-md);
  }

  .main__content h2 {
    font-size: 1.5rem;
  }

  .main__content p {
    font-size: 1rem;
    margin: var(--spacing-sm) 0;
  }

  .main__img--container {
    order: -1;
    margin-bottom: var(--spacing-md);
  }

  #main__img {
    width: 70%;
    max-width: 300px;
  }
}

@media screen and (max-width: 480px) {
  .main__content h1 {
    font-size: 2rem;
  }

  .main__content h2 {
    font-size: 1.2rem;
  }

  .main__content p {
    font-size: 0.9rem;
  }

  .main__btn {
    padding: 12px 24px;
    font-size: 0.9rem;
  }

  #main__img {
    width: 90%;
  }
}

/* Projects Section */
.recent-builds {
  padding: var(--spacing-md) var(--spacing-sm);
  background-color: white; /* Changed from #f9f9f9 to white */
}

/* Add consistent spacing between project sections */
.recent-builds + .recent-builds {
  padding-top: 0; /* Remove top padding from consecutive project sections */
}

.recent-builds h1 {
  font-size: 2.5rem;
  margin-bottom: var(--spacing-md);
  color: var(--text-dark);
  text-align: left; /* Changed from center to left */
}

.projects-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--spacing-md);
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 var(--spacing-sm);
  width: 100%; /* Add this to ensure full width */
}

.project-card {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  height: 100%;
  display: flex;
  flex-direction: column;
  cursor: pointer; /* Added cursor pointer */
}

.project-card:hover,
.project-card:focus-within {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.project-card img {
  width: 100%;
  height: 200px; /* Reduced from 250px to make cards shorter */
  object-fit: cover;
  transition: var(--transition);
}

.project-card:hover img {
  transform: scale(1.05);
}

.project-info {
  padding: 1.25rem; /* Reduced from var(--spacing-md) to make cards more compact */
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.project-info h3 {
  font-size: 1.2rem; /* Slightly reduced from 1.3rem */
  margin-bottom: 0.75rem; /* Reduced from var(--spacing-sm) */
  color: var(--text-dark);
}

.project-info p {
  font-size: 0.76rem; /* Reduced from 0.95rem by factor of 0.8 */
  color: #555;
  margin-bottom: 1rem; /* Reduced from var(--spacing-md) */
  flex-grow: 1;
  line-height: 1.5; /* Slightly reduced line height for better fit */
}

.project-info .main__btn {
  margin-top: auto;
  align-self: stretch;
  padding: 10px 24px; /* Reduced padding for a smaller button */
}

/* Photography Section */
.photos {
  padding: var(--spacing-lg) var(--spacing-sm);
  background: var(--text-light);
  text-align: center;
}

.photos h1 {
  font-size: 2.5rem;
  margin-bottom: var(--spacing-lg);
  color: var(--text-dark);
}

.photos__container {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* Changed to exactly 3 columns */
  gap: var(--spacing-md);
  max-width: 1300px;
  margin: 0 auto;
}

/* Responsive grid for smaller screens */
@media screen and (max-width: 992px) {
  .photos__container {
    grid-template-columns: repeat(2, 1fr); /* 2 columns on medium screens */
  }
}

@media screen and (max-width: 576px) {
  .photos__container {
    grid-template-columns: 1fr; /* 1 column on small screens */
  }
}

/* Keep the cursor as default only for the photos__card class */
.photos__card {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  cursor: pointer; /* Change to pointer for better UX */
  /* Remove fixed height to allow for natural aspect ratio */
  height: auto;
  /* Add aspect ratio preservation */
  display: flex;
  flex-direction: column;
}

/* Style for the image to maintain aspect ratio */
.photos__card img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain; /* Ensures the entire image is visible */
  border-radius: 10px;
  transition: var(--transition);
}

.photos__card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  opacity: 0;
  transition: var(--transition);
  z-index: 1;
}

.photos__card:hover::before,
.photos__card:focus::before {
  opacity: 1;
}

.photos__card h2,
.photos__card p {
  position: absolute;
  color: transparent;
  transition: var(--transition);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  z-index: 2; /* Ensure text is above the overlay */
}

.photos__card h2 {
  bottom: 60px;
  left: 20px;
  font-size: 1.5rem;
}

.photos__card p {
  bottom: 30px;
  left: 20px;
  font-size: 1rem;
}

.photos__card:hover h2,
.photos__card:focus h2,
.photos__card:hover p,
.photos__card:focus p {
  color: var(--text-light);
}

/* Footer Section */
.footer__container {
  background-color: var(--secondary);
  padding: var(--spacing-sm) 0; /* Reduced from var(--spacing-md) to make footer smaller */
}

/* Social Media */
.social__media {
  max-width: 1300px;
  width: 100%;
  margin: 0 auto;
}

.social__media--wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 90%; /* Increased from 80% to use more space */
  max-width: 1200px; /* Increased from 800px */
  margin: 0 auto;
  padding: var(--spacing-xs) 0; /* Reduced from var(--spacing-sm) */
}

.social__icons {
  display: flex;
  justify-content: flex-end; /* Ensure icons are aligned to the right */
  align-items: center;
  gap: var(--spacing-md);
}

.social__icon--link {
  color: var(--text-light);
  font-size: 24px;
  transition: var(--transition);
  cursor: pointer; /* Explicitly set cursor to pointer */
}

.social__icon--link:hover,
.social__icon--link:focus {
  color: var(--primary-light);
  transform: translateY(-3px);
}

.website__right {
  color: var(--text-light);
  margin: 0;
  font-size: 1rem;
  text-align: left; /* Ensure text is aligned to the left */
}

/* Responsive Footer */
@media screen and (max-width: 768px) {
  .social__media--wrap {
    flex-direction: row; /* Changed from column to keep the layout consistent */
    gap: var(--spacing-md);
    width: 90%;
    padding: var(--spacing-xs) 0; /* Reduced padding */
  }

  .social__icons {
    justify-content: flex-end; /* Keep icons aligned to the right */
    gap: var(--spacing-sm); /* Reduced gap between icons */
  }

  .website__right {
    text-align: left; /* Keep text aligned to the left */
    font-size: 0.9rem; /* Slightly reduce font size on mobile */
  }
}

/* For very small screens, switch to column layout */
@media screen and (max-width: 576px) {
  .social__media--wrap {
    flex-direction: column;
    gap: var(--spacing-sm);
  }

  .social__icons {
    justify-content: center;
    width: 100%;
    margin-top: var(--spacing-xs);
  }

  .website__right {
    text-align: center;
    width: 100%;
  }
}

/* Loading States */
.loading {
  position: relative;
  overflow: hidden;
}

.loading::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

/* Focus Styles for Accessibility */
a:focus,
button:focus,
input:focus,
textarea:focus {
  /* Remove default outline */
  outline: none;
}

/* Add a subtle background change instead of outline for accessibility */
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  box-shadow: 0 0 0 2px var(--primary-light);
}

/* Special handling for buttons to remove outline but maintain accessibility */
button:focus-visible,
.button:focus-visible,
.main__btn:focus-visible {
  box-shadow: 0 0 0 2px var(--primary-light);
}

/* Skip to content link for accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary);
  color: white;
  padding: 8px;
  z-index: 1000;
  transition: top 0.3s;
}

.skip-link:focus {
  top: 0;
}

/* Utility Classes */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Animation Classes */
.fade-in {
  animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Utilities */
@media screen and (max-width: 1200px) {
  .container {
    padding: 0 var(--spacing-md);
  }
}

@media screen and (max-width: 992px) {
  :root {
    --spacing-lg: 3rem;
  }
}

@media screen and (max-width: 768px) {
  :root {
    --spacing-md: 1.5rem;
    --spacing-lg: 2.5rem;
  }
}

@media screen and (max-width: 576px) {
  :root {
    --spacing-sm: 0.75rem;
    --spacing-md: 1.25rem;
    --spacing-lg: 2rem;
  }
}

/* Ensure all links have pointer cursor */
a,
a:link,
a:visited,
a:hover,
a:active {
  cursor: pointer !important;
}

/* Add this at the end of your CSS file for maximum specificity */

/* Target navbar elements specifically with higher specificity */
.navbar .navbar__container .navbar__menu .navbar__item .navbar__links,
.navbar .navbar__container #navbar__logo,
.navbar .navbar__container .navbar__menu .navbar__btn .button {
  cursor: pointer !important;
}

/* For mobile menu toggle */
.navbar .navbar__container .navbar__toggle {
  cursor: pointer !important;
}

/* Ensure hover states also maintain the pointer */
.navbar .navbar__container .navbar__menu .navbar__item .navbar__links:hover,
.navbar .navbar__container #navbar__logo:hover,
.navbar .navbar__container .navbar__menu .navbar__btn .button:hover {
  cursor: pointer !important;
}
