:root {
    --indigo: #2A2E6E;
    --accent-purple: #7D5FFF;

    --soft-blue: #dce8ff;
    --soft-lavender: #e9ddff;

    --dark-neutral: #3A3F55;
    --medium-neutral: #6B7280;
    --light-neutral: #E4E7EC;

    --btn-bg: #2A2E6E;
    --btn-hover: #24285A;

    --nav-text: #2A2E6E;
    --nav-hover: #7D5FFF;

    --section-blue-tint: #f8faff;
    --section-purple-tint: #fbf8ff;
    --active-btn: crimson;
}


*,
*:before,
*::after{
    box-sizing: border-box;
}

html, body{
    height: 100%;
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #edf4ff, #f2eaff);

}

.container{
    width: 100%;
    margin: 0 auto;
    padding: 0 1rem;
}

.header-inner {
    display: flex;
    align-items: center;
    padding: 0.75rem;
}

.brand .logo {
    margin: 0;
    font-size: 1.35rem;
    color: #2A2E6E;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    letter-spacing: 0.6px;    
}

.site-nav {
    margin-left: auto;
}

.nav-toggle{
    background: transparent;
    color: #2A2E6E;
    border: 1px solid transparent;
    font-size: 1.05rem;
    padding: 0.4rem 0.6rem;
    display: inline-block;
    font-family: Roboto;
    font-weight: 600;
}

.nav-list {
    list-style: none;
    gap: 1rem;
    padding-left: 0;
    margin: 0;
    display: none;
}

.nav-list li a{
    text-decoration: none;
    color: var(--nav-text);
    font-weight: 600;
    transition: color 0.3s ease;
}

/* Hero Section */
.hero {
    padding: 6rem 0;
    text-align: center;
    background-color: #fbf8ff;
}

.hero-inner h1 {
    color: var(--indigo);
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.highlight {
    color: var(--accent-purple);
}

.hero-inner h2 {
    font-size: 1.8rem;
    color: var(--medium-neutral);
    margin-top: 0;
}

.hero-inner p {
    font-size: 1.1rem;
    color: var(--dark-neutral);
    margin: 1rem 0 2rem;
}

/* Buttons */

.btn {
    text-decoration: none;
    padding: 0.8rem 1.6rem;
    border-radius: 6px;
    font-weight: 600;
    display: inline-block;
    transition: 0.3s ease;
    cursor: pointer;
}

/* Primary button (dark indigo) */
.primary-btn {
    background: var(--btn-bg);
    color: #ffffff;
}

.primary-btn:hover {
    background: var(--btn-hover);
    transition: 0.25s ease;
}

.primary-btn:active {
    background: var(--active-btn);
}

/* Secondary button (outline) */
.secondary-btn {
    border: 2px solid var(--indigo);
    color: var(--indigo);
    background: transparent;
}

.secondary-btn:hover {
    background: var(--btn-hover);
    border: 1px solid var(--btn-hover);
    color: #fff;
    transition: 0.25 ease;
}

.secondary-btn:active {
    background: var(--active-btn);
}

.nav-list li a {
    padding: 0.5rem;
}

.nav-list li a:hover {
    background: var(--btn-hover);
    color: #fff;
    border-radius: 5px;
}

.nav-list li a:active {
    background: var( --active-btn);
}


@media (max-width: 767px){
    /* ---------- Mobile nav dropdown ---------- */
.nav-list{
    flex-direction: column;
    background: #2A2E6E;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 0.5rem;

    
}

.nav-list li{
    padding: 0.5rem 0;
}

.nav-list li a {
  color: #fff;
  font-size: 1rem;
}

}

/*--- For desktop and larger screens---*/

@media (min-width: 900px){
    .hero-inner{
        flex-direction: row;
        align-items: flex-start;
        justify-content: space-between;
    }

    .nav-toggle{
        display: none;
    }

    .nav-list {
        display: flex;
        flex-direction: row;
        gap: 2rem;
        position: absolute;
        left: 30rem;
        justify-content: space-evenly;

    }

}

/*-- Projects Section --*/

/* ===== PROJECTS SECTION ===== */

.projects {
  background-color: #f6f8fb;
  padding: 5rem 1.5rem;
}

.projects-inner {
  max-width: 100%;
  margin: auto;
}

.projects-group-title {
  margin-top: 3rem;
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
  font-weight: 600;
  color: #2563eb;
  text-align: center;
}


.section-title {
  text-align: center;
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
  font-family:'Segoe UI';
  color:#24285A;
}

.section-subtitle {
  text-align: center;
  color: #555;
  margin-bottom: 3rem;
}

/* Grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

/* Card */
.project-card {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.12);
}

/* Image */
.project-image img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

/* Content */
.project-content {
  padding: 1.5rem;
}

.project-content h3 {
  margin-bottom: 0.5rem;
}

.project-content p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #555;
}

/* ===== PROJECT TAGS ===== */

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;

  list-style: none;
  padding: 0;
  cursor: pointer;
}

.project-tags li {
  display: inline-block;
  background: #eef2f7;
  color: #333;
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  font-size: 0.75rem;
}

.project-tags li:hover {
  background: #dbe4f0;
}

/* Project filter styles */

.project-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
  justify-content: center;
}

.filter-btn {
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid #ccc;
  background: #f7f7f7;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  border-color: #000;
}

.filter-btn.active {
  background: #000;
  color: #fff;
  border-color: #000;
}

.projects-group-title {
  margin-top: 2.5rem;
}

.projects-grid {
  margin-bottom: 3rem;
}


/* Button */
.project-btn {
  display: inline-block;
  margin-top: 1.2rem;
  color: #0077b6;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.project-btn:hover {
  text-decoration: underline;
}


/* ===== MODAL ===== */

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal.active {
  display: flex;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}

.modal-content {
  position: relative;
  max-height: 85vh;        /* 👈 KEY FIX */
  overflow-y: auto;        /* 👈 KEY FIX */
  background: #fff;
  border-radius: 14px;
  padding: 1.5rem;
  width: min(90%, 900px);
  margin: auto;
  outline: none;
}

.modal-content img {
  width: 100%;
  border-radius: 10px;
  margin-bottom: 1rem;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}

/* ===== MODAL LINKS ===== */

.modal-links {
  margin-top: 1.5rem;
  display: flex;
  gap: 1rem;
}

.modal-links a {
  text-decoration: none;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  font-weight: 600;
  background: #0077b6;
  color: #fff;
}

.modal-links a:last-child {
  background: #2a9d8f;
}

.modal-links a:hover {
  opacity: 0.9;
}

.admin-login-link {
  font-size: 0.8rem;
  opacity: 0.6;
  padding: 0.2rem 1rem;
}

.admin-login-link:hover {
  opacity: 1;
}



/* ===== AUTH PAGE ===== */

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #0f172a, #020617);
  font-family: 'Montserrat', sans-serif;
}

/* Card */
.auth-card {
  background: #ffffff;
  width: 100%;
  max-width: 420px;
  padding: 2.5rem;
  border-radius: 16px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
  animation: fadeIn 0.5s ease;
}

/* =======================
   RESPONSIVE MOBILE Login Screen
   ======================= */
@media (max-width: 768px) {
  .auth-card {
    width: 90%;
  }
}



/* Heading */
.auth-card h2 {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 1.6rem;
  color: #020617;
}

/* Form Group */
.form-group {
  margin-bottom: 1.4rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #334155;
}

.form-group input {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  border: 1px solid #cbd5f5;
  font-size: 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

/* Button */
.auth-card button {
  width: 100%;
  margin-top: 1rem;
  padding: 0.85rem;
  border-radius: 10px;
  border: none;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  background: #2563eb;
  color: #ffffff;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.auth-card button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.35);
}

/* Error */
.form-error {
  margin-top: 1rem;
  text-align: center;
  color: #dc2626;
  font-size: 0.85rem;
  min-height: 1.2em;
}

/* Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile */
@media (max-width: 480px) {
  .auth-card {
    padding: 2rem 1.5rem;
  }
}




/* ===== ADMIN DASHBOARD ===== */

.admin-page {
  background: #f8fafc;
  min-height: 100vh;
}

.admin-header {
  background: #2A2E6E;
  color: #fff;
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-header button {
  background: #ef4444;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.admin-header button:hover {
    background-color: orange;
}

.admin-container {
  max-width: 1200px;
  margin: auto;
  padding: 2rem;
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 2rem;
}

/* Form */
.admin-form-section {
  background: #fff;
  padding: 1.8rem;
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(0,119,182,0.4);
}

.admin-form-section input,
.admin-form-section textarea {
  width: 100%;
  margin-bottom: 1rem;
  padding: 0.7rem;
  border-radius: 8px;
  border: 1px solid #cbd5f5;
  font-family: Arial, Helvetica, sans-serif;
}

.admin-form-section input:focus-visible,
.admin-form-section textarea:focus-visible {
  outline: none;
  border-color: #0077b6;
  box-shadow: 0 0 0 3px rgba(0, 119, 182, 0.15);
}


.admin-form-section button {
  width: 100%;
  background: #2563eb;
  color: #fff;
  padding: 0.8rem;
  border-radius: 10px;
  border: none;
  font-weight: 600;
  cursor: pointer;
}

.admin-form-section button:hover {
    background-color: #fff;
    color: #000;
    transition: color 0.3s ease;
    border: solid #0077b6 ;
}

.admin-form-section button:active {
    border: solid crimson;
}

/* Project List */
.admin-list-section {
  background: #fff;
  padding: 1.8rem;
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.08);
}

.admin-project {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid #e5e7eb;
}

.admin-project img {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
}

.admin-project button {
  margin-left: auto;
  background: none;
  border: none;
  font-weight: 600;
  cursor: pointer;
}

.admin-project .edit {
  color: #2563eb;
}

.admin-project .delete {
  color: #dc2626;
}


/* =======================
   RESPONSIVE MOBILE FIX
   ======================= */
@media (max-width: 768px) {
  .admin-container {
    display: block; /* override grid */
    padding: 1rem;
  }

  .admin-form-section,
  .admin-list-section {
    width: 100%;
    margin-bottom: 1.5rem; /* space between sections */
  }

  #adminProjects {
    gap: 0.8rem;
  }

  .admin-project img {
    width: 60px;
    height: 50px;
  }
}

/* =======================
   TAG SELECTOR – FIXED MOBILE
   ======================= */

.project-tags-fieldset {
  border: none;
  padding: 0;
  margin-bottom: 1.2rem;
}

.project-tags-fieldset legend {
  font-weight: 600;
  margin-bottom: 0.6rem;
  padding: 0;
}

.tag-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Hide native checkbox */
.tag-selector input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* Pill label */
.tag-selector label {
  display: inline-flex;
}

/* Pill appearance */
.tag-selector span {
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid #cbd5f5;
  background: #f7f7f7;
  color: #333;
  transition: all 0.2s ease;
  white-space: nowrap;
}

/* Checked */
.tag-selector input:checked + span {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}

/* Hover */
.tag-selector label:hover span {
  border-color: #2563eb;
}

/* =======================
   MOBILE ADJUSTMENTS
   ======================= */
@media (max-width: 768px) {
  .tag-selector {
    gap: 0.4rem;
  }

  .tag-selector span {
    font-size: 0.75rem;
    padding: 0.35rem 0.7rem;
  }
}


/* =======================
   MOBILE PROJECT LIST ANIMATION
   ======================= */
@media (max-width: 768px) {
  .admin-list-section {
    opacity: 0;
    transform: translateY(20px);
    animation: slideInProjects 0.5s forwards;
    animation-delay: 0.2s; /* slight delay for smoother effect */
  }

  @keyframes slideInProjects {
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}



/* =====================
   TAG SELECTOR (ADMIN)
   ===================== */

.tag-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1rem 0;
}

/* Tag pill */
.tag-selector label {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.tag-selector span {
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid #ccc;
  color: #333;
  background: #f7f7f7;
  transition: all 0.2s ease;
  user-select: none;
}

/* Checked state */
.tag-selector input:checked + span {
  background: #000;
  color: #fff;
  border-color: #000;
}

/* Keyboard focus */
.tag-selector input:focus-visible + span {
  outline: 2px solid #000;
  outline-offset: 2px;
}

/* Hover */
.tag-selector label:hover span {
  border-color: #000;
}

/* Mobile */
@media (max-width: 600px) {
  .tag-selector span {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }
}

/*about and contact styles */
/* =========================
   ABOUT + CONTACT
========================= */

.about-contact {
  padding: 5rem 1.5rem;
  background: #f6f8fb;
}

/* .about-contact-inner {
  max-width: 1100px;
  margin: auto;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
} */

/* ABOUT CARD */
.about-card {
  display: flex;
  gap: 2rem;
  background: #fff;
  padding: 2.5rem;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.about-image img {
  width: 180px;
  height: 220px;
  object-fit: cover;
  border-radius: 14px;
}

.about-content h2 {
  margin-bottom: 1rem;
  color: #24285A;
}

.about-content p {
  line-height: 1.7;
  color: #444;
}

/* CONTACT CARD */


.contact-card {
  display:block;
  gap: 2rem;
  background: #fff;
  padding: 2.5rem;
  border-radius: 5px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.contact-card h2 {
  margin-bottom: 1.5rem;
  color: #24285A;
}

.contact-list {
  list-style: none;
  padding: 0;
}

.contact-list li {
  display: flex;
  justify-content: space-between;
  padding: 0.7rem 0;
  border-bottom: 1px solid #eee;
}

.contact-list span:first-child {
  font-weight: 600;
  color: #555;
  margin: 0 0.4rem;
}

.contact-list a {
  color: #4a63f3;
  text-decoration: none;
}

.contact-list a:hover {
  text-decoration: underline;
}

/* MOBILE */
@media (max-width: 900px) {
  .about-contact-inner {
    grid-template-columns: 1fr;
  }

  .about-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .about-image img {
    width: 160px;
    height: 200px;
  }
  .contact-section {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

.hidden {
  display: none;
}

/* =========================
   PDF MODAL
========================= */
.pdf-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
}

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

.pdf-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
}

.pdf-modal-content {
  position: relative;
  width: 90%;
  max-width: 900px;
  height: 85vh;
  background: #fff;
  margin: 5vh auto;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.pdf-modal-content iframe {
  flex: 1;
  width: 100%;
}

.pdf-close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 28px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 10;
}

.pdf-preview {
  width: 100%;
  height: 70vh;
  border: none;
  margin-bottom: 1rem;
}

.pdf-open {
  display: inline-block;
  font-weight: 600;
}

/* File preview in admin "Projects" */
.admin-media img {
  width: 120px;
  height: auto;
  border-radius: 6px;
}

.pdf-preview {
  width: 120px;
  height: 80px;
  border: 1px dashed #aaa;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

.pdf-preview a {
  margin-top: 4px;
  font-weight: 600;
}

.pdf-preview a:hover {
  opacity: 1;
}

.no-preview {
  width: 120px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #888;
  border: 1px dashed #ccc;
}
