@import url('https://fonts.googleapis.com/css2?family=Afacad:ital,wght@0,400..700;1,400..700&display=swap');

/* --- CUSTOM COLOR SYSTEM (Strict Palette) --- */
:root {
  --color-black: #000000;
  --color-purple-dark: #6f2dbd;
  --color-purple-medium: #a663cc;
  --color-purple-light: #b298dc;
  --color-white: #ffffff;

  /* Opacity Variances (Alpha) */
  --bg-gradient: linear-gradient(135deg, #000000 0%, #15002a 100%);
  --border-light: rgba(178, 152, 220, 0.15);
  --border-glow: rgba(166, 99, 204, 0.4);
  --glass-bg: rgba(0, 0, 0, 0.75);
  --glass-card: rgba(111, 45, 189, 0.05);
  --text-muted: rgba(255, 255, 255, 0.6);
  --text-disabled: rgba(255, 255, 255, 0.3);
  --overlay-bg: rgba(0, 0, 0, 0.85);
}

/* --- GENERAL RESET & BASE --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

a:focus,
button:focus,
input:focus,
textarea:focus,
[role="button"]:focus {
  outline: none;
}

body {
  font-family: 'Afacad', sans-serif;
  background-color: var(--color-black);
  color: var(--color-white);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  /* Preservation of default scrollbar as per request */
}

a {
  color: var(--color-purple-light);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-white);
}

img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

/* --- LAYOUT WRAPPERS --- */
#app-viewport {
  min-height: calc(100vh - 80px); /* Adjust for header */
  padding-bottom: 90px; /* Space for mobile nav bar */
}

@media (min-width: 769px) {
  #app-viewport {
    padding-bottom: 0;
  }
}

/* --- DESKTOP TOP HEADER --- */
.desktop-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 80px;
  background-color: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-light);
  z-index: 100;
  display: flex;
  align-items: center;
  /* Cinematic scroll-linked visibility for homepage */
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s ease;
}

body[data-route="home"] .desktop-header {
  transform: translateY(-100%);
  opacity: 0;
}

body[data-route="home"].show-nav .desktop-header {
  transform: translateY(0);
  opacity: 1;
}

.header-container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-text {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-white);
}

.logo-text span {
  color: var(--color-purple-medium);
}

.desktop-nav {
  display: flex;
  gap: 2rem;
}

.nav-item {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
  padding: 5px 0;
}

.nav-item::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background-color: var(--color-purple-medium);
  transition: width 0.3s ease, left 0.3s ease;
}

.nav-item:hover::after,
.nav-item.active::after {
  width: 100%;
  left: 0;
}

.nav-item:hover,
.nav-item.active {
  color: var(--color-white);
}

@media (max-width: 768px) {
  .desktop-header {
    display: none;
  }
}

/* --- MOBILE BOTTOM NAVIGATION --- */
.mobile-nav-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 70px;
  background-color: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-light);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Cinematic scroll-linked visibility for homepage */
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s ease;
}

body[data-route="home"] .mobile-nav-bar {
  transform: translateY(100%);
  opacity: 0;
}

body[data-route="home"].show-nav .mobile-nav-bar {
  transform: translateY(0);
  opacity: 1;
}

@media (min-width: 769px) {
  .mobile-nav-bar {
    display: none;
  }
}

/* --- MOBILE TOP HEADER --- */
.mobile-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background-color: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-light);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s ease;
}

body[data-route="home"] .mobile-header {
  transform: translateY(-100%);
  opacity: 0;
}

body[data-route="home"].show-nav .mobile-header {
  transform: translateY(0);
  opacity: 1;
}

.mobile-header-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

@media (min-width: 769px) {
  .mobile-header {
    display: none;
  }
}

.mobile-nav-container {
  position: relative;
  width: 90%;
  max-width: 500px;
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.mobile-nav-item {
  color: var(--text-muted);
  display: flex;
  justify-content: center;
  align-items: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  position: relative;
  z-index: 2;
  transition: color 0.3s, transform 0.3s;
}

.mobile-nav-item.active {
  color: var(--color-purple-medium);
}



/* --- NETWORK SHIMMER BAR --- */
.network-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 1000;
  background-color: rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.network-loader.hidden {
  display: none;
}

.shimmer-bar {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--color-purple-dark), var(--color-purple-light), var(--color-purple-dark));
  background-size: 200% 100%;
  animation: loadingShimmer 1.5s infinite linear;
}

@keyframes loadingShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* --- HOMEPAGE CINEMATIC SCROLL --- */
.cinematic-scroll-track {
  position: relative;
  height: 500vh; /* Controlled track length for letters */
  background-color: var(--color-black);
}

.cinematic-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 5;
}

.cinematic-logo-assembly {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cinematic-letter-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transform: translateY(100vh);
  pointer-events: none;
}

.cinematic-cover-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 6;
  pointer-events: none;
  box-sizing: border-box;
  padding: 10px;
}

@media (min-width: 769px) {
  .cinematic-cover-layer {
    padding: 0;
  }
}

.scroll-indicator-arrow {
  position: absolute;
  bottom: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0.8;
  font-size: 0.9rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-purple-light);
  animation: pulseVertical 2s infinite ease-in-out;
}

.scroll-indicator-arrow svg {
  stroke: var(--color-purple-medium);
  filter: drop-shadow(0 0 5px var(--color-purple-medium));
}

@keyframes pulseVertical {
  0%, 100% { transform: translateY(0); opacity: 0.6; }
  50% { transform: translateY(10px); opacity: 1; }
}

/* Scroll lock status display */
.lock-hint-modal {
  position: absolute;
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid var(--border-glow);
  padding: 12px 20px;
  border-radius: 30px;
  bottom: 110px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--color-white);
  box-shadow: var(--shadow-glow);
  backdrop-filter: blur(10px);
  pointer-events: none;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  z-index: 10;
}

.lock-hint-modal.visible {
  opacity: 1;
  transform: translateY(0);
}

.lock-hint-dot {
  width: 8px;
  height: 8px;
  background-color: var(--color-purple-medium);
  border-radius: 50%;
  animation: blinkDot 1s infinite alternate;
  box-shadow: 0 0 8px var(--color-purple-medium);
}

@keyframes blinkDot {
  0% { opacity: 0.3; }
  100% { opacity: 1; }
}

/* --- SECTION: ABOUT US --- */
.content-section {
  padding: 100px 20px;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 10;
}

.content-section.about-section-wide {
  max-width: 1200px;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 2rem;
  text-align: center;
  color: var(--color-white);
}

.section-title span {
  color: var(--color-purple-medium);
}

.about-card {
  padding: 20px 0;
  margin-bottom: 40px;
}

.about-card p {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 1.5rem;
  text-align: left;
}

.about-card p:last-child {
  margin-bottom: 0;
}

/* About Interactive Panel Styles */
.about-lead-text {
  text-align: center;
  font-size: 1.25rem;
  max-width: 800px;
  margin: -1rem auto 3.5rem auto;
  color: var(--text-muted);
  line-height: 1.6;
}

.about-interactive-container {
  display: grid;
  grid-template-columns: 1.6fr 0.4fr;
  gap: 6rem;
  align-items: center;
  margin-top: 2rem;
  min-height: 250px;
}

.about-interactive-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.about-active-title {
  color: var(--color-white);
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  border-left: 3px solid var(--color-purple-medium);
  padding-left: 1.5rem;
  transition: opacity 0.15s ease-in-out;
}

.about-active-desc {
  color: var(--text-muted);
  font-size: 1.25rem;
  line-height: 1.7;
  max-width: 650px;
  text-align: justify;
  transition: opacity 0.15s ease-in-out;
}

.about-icon-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 280px;
  position: relative;
  width: 60px;
  margin: 0 auto;
}

/* Vertical guide timeline */
.about-icon-panel::before {
  content: '';
  position: absolute;
  left: calc(50% - 0.5px);
  top: 15px;
  bottom: 15px;
  width: 1px;
  background: var(--border-light);
  z-index: 1;
}

.about-icon-row {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  z-index: 2;
  color: var(--text-disabled);
  transition: color 0.3s;
  width: 100%;
}

.about-icon-wrapper {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-black); /* masks the guide line behind the circle */
  border: 1px solid transparent;
  color: inherit;
  transition: transform 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.about-icon-row.active {
  color: var(--color-purple-medium);
}

.about-icon-row.active .about-icon-wrapper {
  transform: scale(1.15);
  border-color: var(--color-purple-medium);
  color: var(--color-purple-light);
}

.about-icon-row:hover {
  color: var(--color-white);
}

@media (max-width: 768px) {
  .about-interactive-container {
    grid-template-columns: 1fr 60px;
    gap: 1.5rem;
    min-height: 230px;
  }
  
  .about-active-title {
    font-size: 1.6rem;
    margin-bottom: 1rem;
    padding-left: 1rem;
  }
  
  .about-active-desc {
    font-size: 1.05rem;
    line-height: 1.6;
    max-width: 100%;
  }
  
  .about-icon-panel {
    height: 240px;
  }
}

/* --- PORTFOLIO LISTING PAGE --- */
.portfolio-container {
  padding: 120px 20px 60px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.search-wrapper {
  max-width: 600px;
  margin: 0 auto 3rem auto;
  position: relative;
}

.search-input {
  width: 100%;
  padding: 15px 25px 15px 50px;
  background: rgba(111, 45, 189, 0.05);
  border: 1px solid var(--border-light);
  border-radius: 30px;
  color: var(--color-white);
  font-family: 'Afacad', sans-serif;
  font-size: 1.1rem;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.search-input:focus {
  border-color: var(--color-purple-medium);
}

.search-icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-purple-light);
  pointer-events: none;
}

/* Row-based layout */
.projects-list {
  display: flex;
  flex-direction: column;
  gap: 6rem;
}

.project-row {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  background: rgba(111, 45, 189, 0.02);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 2.5rem;
  transition: border-color 0.3s, box-shadow 0.3s, opacity 0.3s ease;
}

.project-row.hidden {
  display: none !important;
}

.project-row:hover {
  border-color: var(--color-purple-medium);
  box-shadow: 0 10px 30px rgba(111, 45, 189, 0.05);
}

/* Media (Left side images) Column */
.project-media-col {
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 12px;
  position: relative;
  background-color: #f5f5f7;
}

.project-single-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Carousel inside row */
.project-carousel {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.carousel-slides {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.carousel-slide {
  min-width: 100%;
  height: 100%;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--color-white);
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: background 0.2s, transform 0.2s;
}

.carousel-nav:hover {
  background: var(--color-purple-medium);
}

.carousel-nav:active {
  transform: translateY(-50%) scale(0.95);
}

.carousel-prev {
  left: 15px;
}

.carousel-next {
  right: 15px;
}

.carousel-dots {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.carousel-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background 0.3s, border-color 0.3s, transform 0.3s;
}

.carousel-dot.active {
  background: var(--color-white);
  border-color: var(--color-purple-medium);
  transform: scale(1.2);
  box-shadow: none;
}

/* Details Column */
.project-details-col {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.project-row-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: 1.2rem;
  letter-spacing: 0.5px;
}

.project-row-desc {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 2rem;
  text-align: justify;
}

.project-row-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background-color: var(--color-purple-medium);
  color: var(--color-white);
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 30px;
  transition: background-color 0.3s, box-shadow 0.3s;
  width: fit-content;
  border: 1px solid transparent;
}

.project-row-link-btn:hover {
  background-color: var(--color-purple-light);
  color: var(--color-black);
  box-shadow: 0 5px 15px rgba(178, 152, 220, 0.3);
}

.project-image-placeholder {
  width: 100%;
  height: 100%;
}

.shimmer {
  background: linear-gradient(90deg, rgba(111, 45, 189, 0.05) 25%, rgba(166, 99, 204, 0.15) 50%, rgba(111, 45, 189, 0.05) 75%);
  background-size: 200% 100%;
  animation: shimmerEffect 1.5s infinite linear;
}

@keyframes shimmerEffect {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Alternating rows for desktop */
@media (min-width: 769px) {
  .project-row {
    flex-direction: row;
    align-items: stretch;
    gap: 4rem;
    padding: 3rem;
  }
  
  .project-media-col {
    flex: 0 0 50%;
  }
  
  .project-details-col {
    flex: 1;
  }
  
  .project-row:nth-child(even) {
    flex-direction: row-reverse;
  }
}

/* --- CONTACT PAGE / BLOCK (White theme background, flat professional) --- */
.contact-section-full {
  background-color: var(--color-white);
  color: var(--color-black);
  width: 100%;
  padding: 80px 0;
  position: relative;
  z-index: 10;
}

.contact-wrapper {
  width: 90%;
  max-width: 600px;
  margin: 0 auto;
}

.contact-title {
  color: var(--color-black) !important;
  font-size: 2.5rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 2rem;
  text-align: center;
}

.contact-title span {
  color: var(--color-purple-dark) !important;
}

.contact-subtitle {
  text-align: center;
  font-size: 1.15rem;
  color: rgba(0, 0, 0, 0.6);
  margin-top: -1.2rem;
  margin-bottom: 2.2rem;
  font-weight: 500;
  line-height: 1.5;
}

.form-group {
  margin-bottom: 1.8rem;
  position: relative;
}

.form-label {
  display: block;
  font-size: 0.95rem;
  color: var(--color-black);
  margin-bottom: 8px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.form-input {
  width: 100%;
  padding: 14px 20px;
  background: var(--color-white);
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  color: var(--color-black);
  font-family: 'Afacad', sans-serif;
  font-size: 1.05rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.form-input::placeholder {
  color: rgba(0, 0, 0, 0.4);
}

.form-input:focus {
  border-color: var(--color-purple-dark);
}

/* Tooltip on white background */
.contact-wrapper .tooltip-trigger {
  position: relative;
  display: inline-block;
  width: 100%;
}

.contact-wrapper .custom-tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  background-color: var(--color-black);
  border: 1px solid var(--color-black);
  color: var(--color-white);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  white-space: normal;
  width: max-content;
  max-width: min(260px, 80vw);
  text-align: center;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.contact-wrapper .custom-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 5px;
  border-style: solid;
  border-color: var(--color-black) transparent transparent transparent;
}

.contact-wrapper .form-input:focus + .custom-tooltip,
.contact-wrapper .form-input:hover + .custom-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(-5px);
}

/* Flat button styling, no lift or shadows */
.btn-primary {
  width: 100%;
  background: var(--color-black);
  color: var(--color-white);
  padding: 15px 30px;
  border: 1px solid var(--color-black);
  border-radius: 8px;
  font-family: 'Afacad', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.btn-primary:hover:not(:disabled) {
  background: var(--color-purple-dark);
  border-color: var(--color-purple-dark);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* --- MODAL DIALOGS --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--overlay-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay:not(.hidden) {
  opacity: 1;
  pointer-events: auto;
}

.modal-overlay.hidden {
  display: none;
}

.modal-card {
  width: 90%;
  max-width: 450px;
  background: var(--color-black);
  border: 1px solid var(--border-glow);
  border-radius: 16px;
  padding: 30px;
  box-shadow: var(--shadow-glow);
  text-align: center;
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay:not(.hidden) .modal-card {
  transform: scale(1);
}

.modal-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.modal-body {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 2rem;
}

.modal-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.modal-actions button {
  padding: 10px 25px;
  border-radius: 20px;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  font-family: 'Afacad', sans-serif;
}

.btn-secondary {
  background: rgba(111, 45, 189, 0.15);
  color: var(--color-purple-light);
  border: 1px solid var(--border-light) !important;
}

.btn-secondary:hover {
  background: rgba(111, 45, 189, 0.3);
  color: var(--color-white);
}

.btn-secondary.hidden {
  display: none;
}

/* --- ADMIN PANEL --- */
.admin-container {
  padding: 120px 20px 60px 20px;
  max-width: 1100px;
  margin: 0 auto;
}

.admin-login-box {
  max-width: 400px;
  margin: 4rem auto;
  background: rgba(111, 45, 189, 0.02);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 30px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.admin-header-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3rem;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 1rem;
}

.admin-btn-logout {
  padding: 8px 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-light);
  color: var(--color-purple-light);
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.admin-btn-logout:hover {
  border-color: var(--color-purple-medium);
  color: var(--color-white);
}

.admin-dashboard-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

@media (min-width: 900px) {
  .admin-dashboard-layout {
    grid-template-columns: 1.2fr 0.8fr;
  }
}

.admin-section-card {
  background: rgba(111, 45, 189, 0.02);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 30px;
  box-shadow: 0 10px 35px rgba(0,0,0,0.5);
  height: fit-content;
}

.admin-form-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.8rem;
  color: var(--color-purple-light);
  border-left: 3px solid var(--color-purple-medium);
  padding-left: 10px;
}

/* Image uploader styling */
.uploader-dropzone {
  border: 2px dashed var(--border-light);
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  background: rgba(111, 45, 189, 0.01);
  cursor: pointer;
  transition: border-color 0.3s, background-color 0.3s;
  margin-bottom: 1.5rem;
}

.uploader-dropzone:hover,
.uploader-dropzone.dragover {
  border-color: var(--color-purple-medium);
  background: rgba(111, 45, 189, 0.04);
}

.uploader-icon {
  margin-bottom: 10px;
  color: var(--color-purple-light);
}

.uploader-text {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.uploader-text span {
  color: var(--color-purple-medium);
  font-weight: 600;
}

/* Uploaded Images Order Grid */
.uploaded-images-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 12px;
  margin-bottom: 1.5rem;
}

.uploaded-img-card {
  position: relative;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  aspect-ratio: 1;
  overflow: hidden;
  background-color: rgba(0, 0, 0, 0.3);
}

.uploaded-img-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.uploaded-img-card.uploading::after {
  content: "";
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.6);
}

.uploaded-img-card.uploading::before {
  content: "";
  position: absolute;
  top: calc(50% - 12px); left: calc(50% - 12px);
  width: 24px; height: 24px;
  border: 2px solid var(--color-purple-light);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spinner 0.8s linear infinite;
  z-index: 2;
}

@keyframes spinner {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Controls overlay for reordering/removing */
.uploaded-img-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  justify-content: space-around;
  padding: 4px;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 3;
}

.uploaded-img-card:hover .uploaded-img-controls {
  opacity: 1;
}

.control-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 4px;
  transition: color 0.2s, background-color 0.2s;
}

.control-btn:hover {
  color: var(--color-white);
  background-color: var(--color-purple-dark);
}

.control-btn.btn-remove:hover {
  color: #ff5555;
  background-color: rgba(255, 0, 0, 0.15);
}

/* Admin lists table */
.admin-projects-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.admin-project-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(111, 45, 189, 0.04);
  border: 1px solid var(--border-light);
  padding: 15px 20px;
  border-radius: 12px;
  cursor: grab;
  transition: transform 0.2s, background-color 0.2s, border-color 0.2s;
}

.admin-project-item:active {
  cursor: grabbing;
}

.admin-project-item.dragging {
  opacity: 0.4;
  transform: scale(0.98);
  border: 1px dashed var(--color-purple-medium);
}

.admin-project-item.drag-over {
  border: 2px dashed var(--color-purple-medium) !important;
  background: rgba(111, 45, 189, 0.08) !important;
}

.admin-project-title {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--color-white);
}

.admin-project-actions {
  display: flex;
  gap: 8px;
}

.admin-action-btn {
  border: 1px solid var(--border-light);
  background: rgba(255, 255, 255, 0.02);
  color: var(--color-purple-light);
  padding: 6px 12px;
  font-size: 0.85rem;
  border-radius: 6px;
  cursor: pointer;
  font-family: 'Afacad', sans-serif;
  transition: all 0.2s;
}

.admin-action-btn:hover {
  border-color: var(--color-purple-medium);
  background: rgba(166, 99, 204, 0.1);
  color: var(--color-white);
}

.admin-action-btn.btn-delete:hover {
  border-color: #ff5555;
  background: rgba(255, 0, 0, 0.1);
  color: #ff8888;
}

/* --- FOOTER --- */
.site-footer {
  background: #000000;
  border-top: 1px solid var(--border-light);
  padding: 50px 20px 20px 20px;
  margin-top: 80px;
  position: relative;
  z-index: 10;
}

@media (max-width: 768px) {
  .site-footer {
    padding-bottom: 90px;
  }
}

.footer-container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-bottom: 40px;
}

@media (min-width: 768px) {
  .footer-container {
    grid-template-columns: 1.5fr 1fr 1fr;
  }
}

.footer-brand .logo-text {
  display: inline-block;
  margin-bottom: 1rem;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 320px;
}

.footer-section-title {
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-purple-light);
  margin-bottom: 1.2rem;
  font-weight: 600;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.footer-links a:hover {
  color: var(--color-white);
}

.footer-contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.social-links {
  display: flex;
  gap: 15px;
  margin-top: 15px;
}

.social-link {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-purple-light);
  transition: all 0.3s;
}

.social-link:hover {
  border-color: var(--color-purple-medium);
  background: rgba(111, 45, 189, 0.15);
  color: var(--color-white);
  box-shadow: 0 0 10px rgba(111, 45, 189, 0.3);
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  border-top: 1px solid rgba(178, 152, 220, 0.07);
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
  }
}

.copyright-text {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.4);
}

/* --- LIGHT THEME FOR ADMIN, PRODUCTS, PRODUCT, & CONTACT ROUTES --- */
body[data-route="admin"],
body[data-route="products"],
body[data-route="product"],
body[data-route="contact"] {
  background-color: var(--color-white);
  color: var(--color-black);
}

body[data-route="admin"] #app-viewport,
body[data-route="products"] #app-viewport,
body[data-route="product"] #app-viewport,
body[data-route="contact"] #app-viewport {
  --text-muted: rgba(0, 0, 0, 0.5);
  --text-disabled: rgba(0, 0, 0, 0.3);
  --border-light: rgba(0, 0, 0, 0.1);
  --glass-card: rgba(111, 45, 189, 0.02);
}

/* Admin container & Dashboard styles */
body[data-route="admin"] .section-title {
  color: var(--color-black);
}

body[data-route="admin"] .section-title span {
  color: var(--color-purple-dark);
}

body[data-route="admin"] .admin-login-box {
  background: var(--color-white);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  padding: 40px;
}

body[data-route="admin"] .admin-header-actions h2 {
  color: var(--color-black);
}

body[data-route="admin"] .admin-header-actions h2 span {
  color: var(--color-purple-dark);
}

body[data-route="admin"] .admin-section-card {
  background: var(--color-white);
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

body[data-route="admin"] .admin-form-title {
  color: var(--color-black);
  border-left: 3px solid var(--color-purple-dark);
}

body[data-route="admin"] .admin-project-item {
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

body[data-route="admin"] .admin-project-title {
  color: var(--color-black);
}

body[data-route="admin"] .admin-action-btn {
  border: 1px solid rgba(0, 0, 0, 0.15);
  background: rgba(0, 0, 0, 0.02);
  color: rgba(0, 0, 0, 0.7);
}

body[data-route="admin"] .admin-action-btn:hover {
  border-color: var(--color-purple-dark);
  background: rgba(111, 45, 189, 0.05);
  color: var(--color-purple-dark);
}

body[data-route="admin"] .admin-action-btn.btn-delete:hover {
  border-color: #ff5555;
  background: rgba(255, 0, 0, 0.05);
  color: #ff3333;
}

body[data-route="admin"] .uploader-dropzone {
  border: 2px dashed rgba(0, 0, 0, 0.15);
  background: rgba(0, 0, 0, 0.01);
}

body[data-route="admin"] .uploader-dropzone:hover {
  border-color: var(--color-purple-dark);
  background: rgba(111, 45, 189, 0.03);
}

body[data-route="admin"] .uploader-icon {
  color: var(--color-purple-dark);
}

body[data-route="admin"] .uploader-text {
  color: rgba(0, 0, 0, 0.6);
}

body[data-route="admin"] .uploader-text span {
  color: var(--color-purple-dark);
}

body[data-route="admin"] .uploaded-img-card {
  border: 1px solid rgba(0, 0, 0, 0.1);
}

body[data-route="admin"] .btn-secondary {
  background: rgba(0, 0, 0, 0.05);
  color: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(0, 0, 0, 0.15) !important;
}

body[data-route="admin"] .btn-secondary:hover {
  background: rgba(0, 0, 0, 0.1);
  color: var(--color-black);
}

body[data-route="admin"] .admin-header-actions {
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

body[data-route="admin"] .admin-btn-logout {
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.15);
  color: rgba(0, 0, 0, 0.7);
}

body[data-route="admin"] .admin-btn-logout:hover {
  border-color: var(--color-purple-dark);
  color: var(--color-purple-dark);
}

/* --- LIGHT THEME FOR MODALS ON ADMIN, PRODUCTS, PRODUCT, & CONTACT ROUTES --- */
body[data-route="admin"] .modal-card,
body[data-route="products"] .modal-card,
body[data-route="product"] .modal-card,
body[data-route="contact"] .modal-card {
  background: var(--color-white);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

body[data-route="admin"] .modal-title,
body[data-route="products"] .modal-title,
body[data-route="product"] .modal-title,
body[data-route="contact"] .modal-title {
  color: var(--color-black);
}

body[data-route="admin"] .modal-body,
body[data-route="products"] .modal-body,
body[data-route="product"] .modal-body,
body[data-route="contact"] .modal-body {
  color: rgba(0, 0, 0, 0.6);
}

body[data-route="admin"] .modal-actions .btn-primary,
body[data-route="products"] .modal-actions .btn-primary,
body[data-route="product"] .modal-actions .btn-primary,
body[data-route="contact"] .modal-actions .btn-primary {
  background: var(--color-black) !important;
  color: var(--color-white) !important;
  border: 1px solid var(--color-black) !important;
}

body[data-route="admin"] .modal-actions .btn-primary:hover,
body[data-route="products"] .modal-actions .btn-primary:hover,
body[data-route="product"] .modal-actions .btn-primary:hover,
body[data-route="contact"] .modal-actions .btn-primary:hover {
  background: var(--color-purple-dark) !important;
  border-color: var(--color-purple-dark) !important;
}

body[data-route="admin"] .modal-actions .btn-secondary,
body[data-route="products"] .modal-actions .btn-secondary,
body[data-route="product"] .modal-actions .btn-secondary,
body[data-route="contact"] .modal-actions .btn-secondary {
  background: rgba(0, 0, 0, 0.05) !important;
  color: rgba(0, 0, 0, 0.7) !important;
  border: 1px solid rgba(0, 0, 0, 0.15) !important;
}

body[data-route="admin"] .modal-actions .btn-secondary:hover,
body[data-route="products"] .modal-actions .btn-secondary:hover,
body[data-route="product"] .modal-actions .btn-secondary:hover,
body[data-route="contact"] .modal-actions .btn-secondary:hover {
  background: rgba(0, 0, 0, 0.1) !important;
  color: var(--color-black) !important;
}

/* --- LIGHT THEME PORTFOLIO LISTING SPECIFICS --- */
body[data-route="products"] .section-title,
body[data-route="product"] .section-title {
  color: var(--color-black);
}

body[data-route="products"] .section-title span,
body[data-route="product"] .section-title span {
  color: var(--color-purple-dark);
}

body[data-route="products"] .search-input {
  color: var(--color-black);
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(0, 0, 0, 0.12);
}

body[data-route="products"] .search-input:focus {
  border-color: var(--color-purple-dark);
}

body[data-route="products"] .search-icon {
  color: var(--color-purple-dark);
}

body[data-route="products"] .project-row {
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0;
  box-shadow: none;
  padding-left: 0;
  padding-right: 0;
  padding-bottom: 4rem;
  margin-bottom: 4rem;
}

body[data-route="products"] .project-row:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

body[data-route="products"] .project-row:hover {
  border-color: transparent;
  box-shadow: none;
}

body[data-route="products"] .project-row-title {
  color: var(--color-black);
}

body[data-route="products"] .project-row-desc {
  color: rgba(0, 0, 0, 0.7);
}

body[data-route="products"] .skeleton-card {
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(0, 0, 0, 0.01);
}

/* --- UTILITY CLASSES --- */
.hidden {
  display: none !important;
}

/* --- GOOGLE SIGN IN BUTTON --- */
.google-login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px;
  background: var(--color-white) !important;
  border: 1px solid rgba(0, 0, 0, 0.15) !important;
  border-radius: 30px !important;
  color: rgba(0, 0, 0, 0.7) !important;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.2s, border-color 0.2s;
  cursor: pointer;
  margin-top: 10px;
  box-sizing: border-box;
}

.google-login-btn:hover {
  background: rgba(0, 0, 0, 0.02) !important;
  border-color: rgba(0, 0, 0, 0.25) !important;
}

.google-icon {
  margin-right: 10px;
  display: block;
  flex-shrink: 0;
}

/* --- BUTTON SPINNER --- */
.btn-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spinner 0.8s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}

/* --- PASSWORD FIELD EYE TOGGLE --- */
.password-wrapper {
  position: relative;
  width: 100%;
}

.password-wrapper .form-input {
  padding-right: 45px !important;
}

.toggle-password-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none !important;
  border: none !important;
  cursor: pointer;
  color: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px !important;
  border-radius: 50%;
  transition: color 0.2s, background-color 0.2s;
  outline: none;
}

.toggle-password-btn:hover {
  color: var(--color-purple-dark);
  background-color: rgba(0, 0, 0, 0.04);
}
