/* -----------------------------------
   Theme variables (change via settings)
----------------------------------- */
:root {
  --background-color: #020617;
  --primary-color: #0b1120;
  --card-color: #0f172a;
  --accent-color: #38bdf8;
  --text-color: #e5e7eb;
  --muted-text-color: #9ca3af;
  --border-color: rgba(148, 163, 184, 0.4);
  --font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  
  /* Semantic colors */
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  --info-color: #3b82f6;
  
  /* Shadow depths */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 12px 28px rgba(0, 0, 0, 0.25);
  
  /* Spacing unit (8px base) */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
}

/* -----------------------------------
   Global
----------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  transition: all 0.2s ease;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background: var(--background-color);
  color: var(--text-color);
  line-height: 1.6;
  padding-bottom: 70px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--accent-color);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

a:hover {
  text-decoration: underline;
  opacity: 0.9;
}

a:focus-visible {
  outline: 2px solid rgba(56, 189, 248, 0.8);
  outline-offset: 2px;
  border-radius: 3px;
}

/* -----------------------------------
   Keyboard Focus Indicators
----------------------------------- */

:focus-visible {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent-color);
  outline-offset: -1px;
}

img {
  max-width: 100%;
  display: block;
  border-radius: 8px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

img:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Gallery image styling */
.gallery-image {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.gallery-image img {
  width: 100%;
  height: auto;
  display: block;
}

/* -----------------------------------
   Typography
----------------------------------- */

h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.2;
  margin: 1rem 0 0.75rem;
  color: var(--text-color);
}

h2 {
  font-size: 1.5rem;
  font-weight: 650;
  letter-spacing: -0.3px;
  line-height: 1.3;
  margin: 1.25rem 0 0.75rem;
  color: var(--text-color);
}

h3 {
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.2px;
  line-height: 1.4;
  margin: 1rem 0 0.5rem;
  color: var(--text-color);
}

h4, h5, h6 {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  margin: 0.75rem 0 0.5rem;
  color: var(--text-color);
}

p {
  margin: 0 0 1rem;
  line-height: 1.6;
  color: var(--text-color);
}

/* ===============================
   PROJECTS PAGE
================================ */

.projects-page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0;
}

/* Hero Banner */
.projects-hero {
  padding: 4rem 2rem 3rem;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(2, 6, 23, 0.98) 100%);
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 2rem;
}

.projects-hero-content {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.breadcrumbs {
  font-size: 0.85rem;
  color: var(--muted-text-color);
  margin-bottom: 1rem;
}

.breadcrumbs a {
  color: var(--accent-color);
  text-decoration: none;
}

.breadcrumbs span {
  margin: 0 0.5rem;
}

.projects-hero-title {
  font-size: 3rem;
  font-weight: 800;
  background: linear-gradient(135deg, #38bdf8, #818cf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0 0 0.75rem;
  line-height: 1.2;
}

.projects-hero-subtitle {
  font-size: 1.15rem;
  color: var(--muted-text-color);
  margin: 0 0 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.projects-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-top: 2rem;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent-color);
  line-height: 1;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--muted-text-color);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 0.5rem;
}

/* Controls Section */
.projects-controls {
  max-width: 1200px;
  margin: 0 auto 2rem;
  padding: 0 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.search-bar-enhanced {
  display: flex;
  gap: 0.5rem;
  max-width: 500px;
}

.search-bar-enhanced input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.5);
  color: var(--text-color);
  font-size: 0.95rem;
}

.search-bar-enhanced button {
  padding: 0.75rem 1.5rem;
  background: var(--accent-color);
  color: var(--primary-color);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.2s ease, background 0.2s ease;
}

.search-bar-enhanced button:hover {
  transform: translateY(-1px);
  background: #7dd3fc;
}

.filter-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

#sort-select {
  padding: 0.65rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.5);
  color: var(--text-color);
  font-size: 0.9rem;
  cursor: pointer;
}

.category-pills {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.category-pill {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.5);
  color: var(--text-color);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.category-pill:hover {
  background: rgba(56, 189, 248, 0.1);
  border-color: var(--accent-color);
}

.category-pill.active {
  background: var(--accent-color);
  color: var(--primary-color);
  border-color: var(--accent-color);
}

.category-pill.clear-filter {
  background: rgba(239, 68, 68, 0.2);
  color: #fecaca;
  border-color: rgba(239, 68, 68, 0.4);
}

/* Projects Container */
.projects-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  min-height: 400px;
}

.projects-masonry {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

@media (max-width: 768px) {
  .projects-masonry {
    grid-template-columns: 1fr;
  }
}

/* Project Card */
.project-card {
  background: var(--card-color);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  opacity: 0;
  animation: fadeInUp 0.5s ease forwards;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
}

.project-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.project-media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, rgba(56,189,248,0.15), rgba(99,102,241,0.1));
}

.project-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.project-card:hover .project-thumb {
  transform: scale(1.05);
}

.project-thumb--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--muted-text-color);
}

.project-featured-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: linear-gradient(135deg, #f59e0b, #eab308);
  color: #000;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.project-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(2, 6, 23, 0.95) 0%,
    rgba(2, 6, 23, 0.5) 50%,
    transparent 100%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: flex-end;
  padding: 1.5rem;
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.project-overlay-inner {
  width: 100%;
}

.project-cta {
  color: var(--accent-color);
  font-weight: 600;
  font-size: 0.95rem;
}

.project-content {
  padding: 1.25rem;
}

.project-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.project-date {
  font-size: 0.8rem;
  color: var(--muted-text-color);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.project-title {
  margin: 0 0 0.75rem;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-color);
}

.project-excerpt {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: var(--muted-text-color);
  line-height: 1.6;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.project-tag {
  padding: 0.3rem 0.7rem;
  background: rgba(56, 189, 248, 0.15);
  color: #7dd3fc;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 500;
}

/* Loading & Empty States */
.loading-state,
.empty-state,
.error-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted-text-color);
}

.empty-state p {
  margin: 0.5rem 0;
}

.loading-more {
  text-align: center;
  padding: 1rem;
  color: var(--muted-text-color);
}

/* Pagination */
.projects-pagination {
  max-width: 1200px;
  margin: 2rem auto 3rem;
  padding: 0 2rem;
  text-align: center;
}

.load-more-btn {
  padding: 0.875rem 2rem;
  background: var(--accent-color);
  color: var(--primary-color);
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.load-more-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(56, 189, 248, 0.3);
}

.pagination-info {
  margin-top: 1rem;
  color: var(--muted-text-color);
  font-size: 0.9rem;
}

/* Back to Top */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  background: var(--accent-color);
  color: var(--primary-color);
  border: none;
  border-radius: 50%;
  font-size: 1.25rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: all 0.2s ease;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.back-to-top:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(56, 189, 248, 0.4);
}

/* Responsive */
@media (max-width: 768px) {
  .projects-hero {
    padding: 2.5rem 1rem 2rem;
  }

  .projects-hero-title {
    font-size: 2rem;
  }

  .projects-hero-subtitle {
    font-size: 1rem;
  }

  .projects-stats {
    gap: 2rem;
  }

  .stat-value {
    font-size: 2rem;
  }

  .projects-controls {
    padding: 0 1rem;
  }

  .search-bar-enhanced {
    max-width: 100%;
  }

  .filter-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .projects-container {
    padding: 0 1rem;
  }

  .back-to-top {
    bottom: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
  }
}


/* -----------------------------------
   OLD CONTACT FORM STYLES REMOVED - SEE MODERN CONTACT PAGE SECTION BELOW
----------------------------------- */


/* -----------------------------------
   OLD CONTACT FORM STYLES REMOVED - SEE MODERN CONTACT PAGE SECTION BELOW
----------------------------------- */


/* -----------------------------------
   Layout helpers
----------------------------------- */

.layout {
  max-width: 1100px;
  margin: 1.5rem auto;
  padding: 0 1rem;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.4fr);
  gap: 1.5rem;
}

@media (max-width: 900px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Landing layout (home page) */
.landing-main {
  max-width: 1100px;
  margin: 1.5rem auto;
  padding: 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.hp-field-wrapper {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* -----------------------------------
   View page container + card
----------------------------------- */

/* The <main id="view-main" class="view-layout"> wrapper */
.view-layout {
  max-width: 780px;
  margin: 1.5rem auto 2rem;
  padding: 0 1rem;
}

/* The <article class="view-body"> that view.js renders */
.view-body {
  background: var(--card-color);
  max-width: 780px;
  border-radius: 18px;
  padding: 1.25rem 1.5rem;
  border: 1px solid rgba(15, 23, 42, 0.9);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.75);
}
/* -----------------------------------
   Header / Navigation (Modern Redesign)
----------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(2, 6, 23, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0.875rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Brand/Logo Section */
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  position: relative;
  z-index: 101;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-color);
  transition: opacity 0.2s ease;
}

.brand-link:hover {
  opacity: 0.9;
}

.brand-logo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.1), rgba(99, 102, 241, 0.1));
  border: 2px solid rgba(56, 189, 248, 0.3);
  transition: all 0.3s ease;
}

.brand-link:hover .brand-logo {
  border-color: var(--accent-color);
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.3);
  transform: scale(1.05);
}

.brand-text {
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #fff, #e0e7ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  position: relative;
  z-index: 101;
}

.hamburger-line {
  width: 26px;
  height: 2px;
  background: var(--text-color);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(7px, 7px);
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* Main Navigation */
.main-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-link {
  color: var(--text-color);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.625rem 1rem;
  border-radius: 8px;
  position: relative;
  transition: all 0.2s ease;
  letter-spacing: 0.3px;
}

.nav-link:hover {
  background: rgba(56, 189, 248, 0.1);
  color: var(--accent-color);
  text-decoration: none;
}

.nav-link.active {
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-color);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 1rem;
  right: 1rem;
  height: 2px;
  background: var(--accent-color);
  border-radius: 2px;
}

#dynamic-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

#dynamic-nav a {
  color: var(--text-color);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.625rem 1rem;
  border-radius: 8px;
  transition: all 0.2s ease;
}

#dynamic-nav a:hover {
  background: rgba(56, 189, 248, 0.1);
  color: var(--accent-color);
  text-decoration: none;
}

/* Responsive Mobile Menu */
@media (max-width: 768px) {
  .header-container {
    padding: 0.75rem 1rem;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .main-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: rgba(2, 6, 23, 0.98);
    backdrop-filter: blur(12px);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 5rem 1.5rem 2rem;
    border-left: 1px solid var(--border-color);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
    transition: right 0.3s ease;
    overflow-y: auto;
  }

  .main-nav.active {
    right: 0;
  }

  .nav-link {
    padding: 1rem 1.25rem;
    border-radius: 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    font-size: 1rem;
  }

  .nav-link.active::after {
    display: none;
  }

  .nav-link.active {
    border-left: 3px solid var(--accent-color);
    background: rgba(56, 189, 248, 0.08);
  }

  #dynamic-nav {
    flex-direction: column;
    gap: 0;
    width: 100%;
  }

  #dynamic-nav a {
    padding: 1rem 1.25rem;
    border-radius: 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    font-size: 1rem;
  }

  .brand-logo {
    width: 40px;
    height: 40px;
  }

  .brand-text {
    font-size: 1rem;
  }
}

/* Mobile overlay when menu is open */
@media (max-width: 768px) {
  .main-nav.active::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 280px;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: -1;
  }
}

/* Tablet adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
  .header-container {
    padding: 0.875rem 1.5rem;
  }

  .nav-link {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
  }
}


/* -----------------------------------
   Cards / generic blocks
----------------------------------- */

.card {
  background: var(--card-color);
  border-radius: 16px;
  padding: 1.25rem;
  border: 1px solid rgba(15, 23, 42, 0.9);
  box-shadow: var(--shadow-lg);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.card:hover {
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.35);
  transform: translateY(-1px);
}

.card-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.card-header h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* -----------------------------------
   Buttons / links
----------------------------------- */

.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.25rem;
  border-radius: 8px;
  border: none;
  background: linear-gradient(135deg, var(--accent-color), #0ea5e9);
  color: #020617;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-md);
}

.link-button:hover {
  opacity: 0.9;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.link-button:focus-visible {
  outline: 2px solid rgba(56, 189, 248, 0.8);
  outline-offset: 2px;
}

.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.25rem;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: transparent;
  color: var(--text-color);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}

.ghost-button:hover {
  background: rgba(56, 189, 248, 0.1);
  border-color: rgba(56, 189, 248, 0.7);
  text-decoration: none;
}

.ghost-button:focus-visible {
  outline: 2px solid rgba(56, 189, 248, 0.8);
  outline-offset: 2px;
}

.small-link {
  font-size: 0.8rem;
  opacity: 0.8;
}

/* ===============================
   Floating Back Button
================================ */

#back-to-projects {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 9999;

  display: inline-flex;
  align-items: center;
  gap: 0.5rem;

  padding: 0.65rem 0.95rem;
  border-radius: 999px;

  background: rgba(2, 6, 23, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.22);
  color: var(--text-color);
  text-decoration: none;
  font-weight: 650;

  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(10px);
}

#back-to-projects:hover {
  border-color: rgba(56, 189, 248, 0.55);
}

#back-to-projects:focus-visible {
  outline: 2px solid rgba(56, 189, 248, 0.85);
  outline-offset: 3px;
}

/* Mobile: keep it off the edge a bit */
@media (max-width: 520px) {
  #back-to-projects {
    right: 12px;
    bottom: 12px;
  }
}


/* -----------------------------------
   Forms
----------------------------------- */

form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-color);
  letter-spacing: 0.3px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="color"],
textarea,
select {
  font: inherit;
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  border: 1px solid rgba(51, 65, 85, 0.9);
  background: #020617;
  color: var(--text-color);
  transition: all 0.2s ease;
}

input[type="text"]::placeholder,
input[type="email"]::placeholder,
input[type="password"]::placeholder,
textarea::placeholder {
  color: rgba(156, 163, 175, 0.7);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="color"]:focus,
textarea:focus,
select:focus {
  outline: 2px solid var(--accent-color);
  outline-offset: -1px;
  border-color: var(--accent-color);
  background: rgba(2, 6, 23, 0.8);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.1);
}

input[type="file"] {
  color: var(--muted-text-color);
  cursor: pointer;
}

/* Input validation states */
input:valid:not(:placeholder-shown),
textarea:valid:not(:placeholder-shown) {
  border-color: var(--success-color);
}

input:invalid:not(:placeholder-shown),
textarea:invalid:not(:placeholder-shown) {
  border-color: var(--danger-color);
  background: rgba(239, 68, 68, 0.05);
}

input.has-error,
textarea.has-error {
  border-color: var(--danger-color);
  background: rgba(239, 68, 68, 0.05);
}

input.has-success,
textarea.has-success {
  border-color: var(--success-color);
}

input.has-warning,
textarea.has-warning {
  border-color: var(--warning-color);
  background: rgba(245, 158, 11, 0.05);
}

textarea {
  resize: vertical;
  font-family: inherit;
  line-height: 1.5;
}

.checkbox-group {
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
}

.checkbox-group input[type="checkbox"] {
  cursor: pointer;
  width: 18px;
  height: 18px;
  accent-color: var(--accent-color);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

button[type="submit"],
button[type="button"] {
  font: inherit;
  padding: 0.6rem 1.25rem;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: rgba(56, 189, 248, 0.1);
  color: var(--text-color);
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
}

button[type="submit"] {
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent-color), #0ea5e9);
  color: #020617;
  font-weight: 600;
  box-shadow: var(--shadow-md);
}

button[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

button[type="button"]:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: rgba(56, 189, 248, 0.6);
}

button:focus-visible {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

/* -----------------------------------
   Search bar / pagination
----------------------------------- */

.search-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.8rem;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(51, 65, 85, 0.8);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.search-bar:focus-within {
  border-color: var(--accent-color);
  background: rgba(15, 23, 42, 0.95);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.1);
}

.search-bar input {
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-color);
  font-size: inherit;
}

.search-bar input::placeholder {
  color: rgba(156, 163, 175, 0.6);
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
  margin-top: 1.5rem;
  font-size: 0.85rem;
}

.pagination button {
  padding: 0.5rem 0.9rem;
  border-radius: 0;
  border: 1px solid rgba(56, 189, 248, 0.5);
  background: rgba(56, 189, 248, 0.05);
  color: var(--text-color);
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
}

.pagination button:first-child {
  border-top-left-radius: 6px;
  border-bottom-left-radius: 6px;
}

.pagination button:last-child {
  border-top-right-radius: 6px;
  border-bottom-right-radius: 6px;
}

.pagination button:hover:not(:disabled) {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.8);
}

.pagination button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pagination span {
  padding: 0.5rem 0.9rem;
  color: var(--muted-text-color);
}

/* -----------------------------------
   Posts list (projects / admin)
----------------------------------- */

#posts-list,
.latest-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.post-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(51, 65, 85, 0.8);
  border-left: 4px solid var(--accent-color);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.post-item:hover {
  background: rgba(15, 23, 42, 0.9);
  border-color: rgba(56, 189, 248, 0.6);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.post-item:last-child {
  border-bottom: none;
}

.post-item-main h3 {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.post-meta {
  font-size: 0.8rem;
  color: var(--muted-text-color);
}

.post-actions {
  display: flex;
  flex-direction: row;
  gap: 0.5rem;
  align-items: center;
}

.post-actions button {
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
}

.post-actions .btn-edit {
  background: linear-gradient(135deg, #3b82f6, #0ea5e9);
  color: white;
  box-shadow: var(--shadow-sm);
}

.post-actions .btn-edit:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.post-actions .btn-delete {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.5);
}

.post-actions .btn-delete:hover {
  background: rgba(239, 68, 68, 0.3);
  border-color: rgba(239, 68, 68, 0.8);
  color: #fecaca;
}

/* ===============================
   Landing Page (Home)
================================ */

/* Hero Section */
.hero-section {
  position: relative;
  min-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1.5rem;
  background: linear-gradient(
    135deg,
    rgba(11, 17, 32, 0.95) 0%,
    rgba(2, 6, 23, 0.98) 50%,
    rgba(15, 23, 42, 0.95) 100%
  );
  border-radius: 24px;
  overflow: hidden;
  animation: fadeInUp 0.8s ease-out;
}

.hero-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(circle at 20% 50%, rgba(56, 189, 248, 0.08), transparent 50%),
    radial-gradient(circle at 80% 50%, rgba(99, 102, 241, 0.06), transparent 50%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-overline {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent-color);
  margin-bottom: 1rem;
  opacity: 0.9;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -1.5px;
  margin: 0 0 1.25rem;
  background: linear-gradient(135deg, #f1f5f9 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.15rem;
  line-height: 1.7;
  color: #cbd5e1;
  margin: 0 0 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.landing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  animation: fadeInUp 0.8s ease-out 0.4s both;
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.5rem;
  color: var(--accent-color);
  opacity: 0.6;
  animation: bounce 2s infinite;
  transition: opacity 0.3s ease;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(10px); }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Section Headers */
.section-header {
  text-align: center;
  margin-bottom: 3rem;
  animation: fadeInUp 0.8s ease-out;
}

.section-overline {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent-color);
  margin-bottom: 0.75rem;
  opacity: 0.9;
}

.section-header h2 {
  font-size: 2.25rem;
  font-weight: 700;
  margin: 0.5rem 0;
  letter-spacing: -0.5px;
}

.view-all-link {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-color);
  text-decoration: none;
  transition: transform 0.2s ease;
}

.view-all-link:hover {
  transform: translateX(5px);
}

/* Features Section */
.features-section {
  padding: 4rem 0;
  animation: fadeInUp 0.8s ease-out 0.3s both;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.feature-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(51, 65, 85, 0.8);
  border-radius: 16px;
  padding: 2rem 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
  animation: fadeInUp 0.6s ease-out both;
}

.feature-card:nth-child(1) { animation-delay: 0.1s; }
.feature-card:nth-child(2) { animation-delay: 0.2s; }
.feature-card:nth-child(3) { animation-delay: 0.3s; }
.feature-card:nth-child(4) { animation-delay: 0.4s; }

.feature-card:hover {
  background: rgba(15, 23, 42, 0.9);
  border-color: rgba(56, 189, 248, 0.5);
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  filter: grayscale(0.2);
}

.feature-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
  color: var(--text-color);
}

.feature-card p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--muted-text-color);
  margin: 0;
}

/* Tech Stack Badges */
.tech-stack {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2rem;
}

.tech-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-color);
  transition: all 0.2s ease;
}

.tech-badge:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: var(--accent-color);
  transform: translateY(-2px);
}

/* Projects Preview Section */
.projects-preview {
  padding: 4rem 0;
  animation: fadeInUp 0.8s ease-out 0.5s both;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.project-preview-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(51, 65, 85, 0.8);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s ease;
  animation: fadeInUp 0.6s ease-out both;
}

.project-preview-card:hover {
  background: rgba(15, 23, 42, 0.9);
  border-color: rgba(56, 189, 248, 0.6);
  transform: translateY(-6px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.4);
}

.project-preview-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.15), rgba(99, 102, 241, 0.1));
  overflow: hidden;
}

.project-preview-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.project-preview-card:hover .project-preview-thumb img {
  transform: scale(1.05);
}

.project-preview-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  opacity: 0.3;
}

.featured-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.35rem 0.75rem;
  background: linear-gradient(135deg, var(--accent-color), #0ea5e9);
  color: #020617;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.project-preview-content {
  padding: 1.5rem;
}

.project-preview-meta {
  font-size: 0.8rem;
  color: var(--muted-text-color);
  margin-bottom: 0.75rem;
}

.project-preview-date {
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.project-preview-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
  line-height: 1.3;
}

.project-preview-title a {
  color: var(--text-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

.project-preview-title a:hover {
  color: var(--accent-color);
}

.project-preview-excerpt {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--muted-text-color);
  margin: 0 0 1rem;
}

.project-preview-link {
  display: inline-flex;
  align-items: center;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-color);
  text-decoration: none;
  transition: transform 0.2s ease;
}

.project-preview-link:hover {
  transform: translateX(5px);
}

/* Loading & Error States */
.loading-state,
.error-state,
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--muted-text-color);
  font-size: 0.95rem;
}

.error-state {
  color: var(--danger-color);
}

/* Responsive */
@media (max-width: 768px) {
  .hero-section {
    min-height: 70vh;
    padding: 2rem 1rem;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
  }
  
  .projects-grid {
    grid-template-columns: 1fr;
  }
}

/* -----------------------------------
   Single view page / content
----------------------------------- */

.view-wrapper {
  max-width: 780px;
  margin: 1.5rem auto 2rem;
  padding: 0 1rem;
}

.view-header {
  margin-bottom: 1rem;
}

.view-header h1 {
  margin: 0 0 0.25rem;
}

.view-body {
  background: var(--card-color);
  border-radius: 18px;
  padding: 1rem 1.2rem;
  border: 1px solid rgba(15, 23, 42, 0.9);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.75);
}

.view-body p {
  margin: 0 0 0.75rem;
}

/* You can still add .view-gallery, .full-width, .hero etc if needed */

/* -----------------------------------
   Settings page
----------------------------------- */

.help-text {
  font-size: 0.8rem;
  color: var(--muted-text-color);
}

.admin-layout {
  max-width: 1200px;
  margin: auto;
}

.card {
  margin-bottom: 1.5rem;
}

.card-body {
  padding: 1.25rem;
}

.theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.inline-form {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Section description text */
.section-description {
  color: var(--muted-text-color);
  margin-bottom: 2rem;
  line-height: 1.6;
}

/* Import/Export Grid */
.import-export-grid {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 1.5rem !important;
  width: 100% !important;
}

.import-export-card {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.03), rgba(139, 92, 246, 0.03));
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem !important;
  text-align: center;
  transition: all 0.3s ease;
  min-width: 0 !important;
}

.import-export-card:hover {
  border-color: rgba(56, 189, 248, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.import-export-card .card-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.1), rgba(139, 92, 246, 0.1));
  border-radius: 50%;
  color: var(--accent-color);
  transition: all 0.3s ease;
}

.import-export-card:hover .card-icon {
  transform: scale(1.1);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(139, 92, 246, 0.2));
}

.import-export-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

.import-export-card p {
  color: var(--muted-text-color);
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  line-height: 1.5;
}

.import-export-card .btn-primary,
.import-export-card .btn-secondary {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.import-export-card .btn-primary {
  background: linear-gradient(135deg, #38bdf8, #8b5cf6);
  color: white;
  border: none;
  cursor: pointer;
}

.import-export-card .btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.4);
}

.import-export-card .btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.import-export-card .btn-secondary {
  background: var(--card-color);
  color: var(--text-color);
  border: 1px solid var(--border-color);
  cursor: pointer;
}

.import-export-card .btn-secondary:hover {
  border-color: var(--accent-color);
  background: rgba(56, 189, 248, 0.05);
}

/* File upload styling */
.file-upload-wrapper {
  margin-bottom: 1rem;
}

.file-upload-label {
  margin-bottom: 0.75rem;
}

.file-name {
  display: block;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--muted-text-color);
  font-style: italic;
}

/* Users List Styling */
.users-list {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

.user-card {
  background: var(--card-color);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.25rem;
  transition: all 0.3s ease;
}

.user-card:hover {
  border-color: rgba(56, 189, 248, 0.3);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.user-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.user-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
}

.user-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #38bdf8, #8b5cf6);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 600;
  flex-shrink: 0;
}

.user-details {
  flex: 1;
  min-width: 0;
}

.user-name {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 0.25rem;
}

.user-email {
  font-size: 0.9rem;
  color: var(--muted-text-color);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-role-badge {
  padding: 0.375rem 0.875rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: capitalize;
}

.user-role-badge.role-admin {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(56, 189, 248, 0.2));
  color: #8b5cf6;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.user-role-badge.role-editor {
  background: rgba(56, 189, 248, 0.1);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.user-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.user-actions button {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0.875rem;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid var(--border-color);
  background: var(--card-color);
  color: var(--text-color);
  cursor: pointer;
  transition: all 0.2s ease;
}

.user-actions .btn-edit:hover {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.1);
  color: #38bdf8;
}

.user-actions .btn-delete:hover {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.user-actions button svg {
  width: 16px;
  height: 16px;
}

/* Edit User Form */
.edit-user-form {
  background: rgba(56, 189, 248, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.25rem;
}

.edit-user-form .form-group {
  margin-bottom: 1rem;
}

.edit-user-form .form-group:last-of-type {
  margin-bottom: 1.5rem;
}

.edit-user-form .form-actions {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0;
}

.edit-user-form .btn-save,
.edit-user-form .btn-cancel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.edit-user-form .btn-save {
  background: linear-gradient(135deg, #38bdf8, #8b5cf6);
  color: white;
}

.edit-user-form .btn-save:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.4);
}

.edit-user-form .btn-cancel {
  background: var(--card-color);
  color: var(--text-color);
  border: 1px solid var(--border-color);
}

.edit-user-form .btn-cancel:hover {
  border-color: var(--border-color);
  background: rgba(255, 255, 255, 0.05);
}

.edit-user-form .btn-save svg,
.edit-user-form .btn-cancel svg {
  width: 16px;
  height: 16px;
}


/* -----------------------------------
   Footer - Modern Design
----------------------------------- */

.site-footer {
  position: relative;
  margin-top: auto;
  background: linear-gradient(180deg, rgba(11, 17, 32, 0.95), rgba(11, 17, 32, 1));
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--border-color);
  padding: 3rem 0 1.5rem;
  z-index: 999;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(56, 189, 248, 0.1);
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.footer-logo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #38bdf8, #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.25rem;
  color: white;
  flex-shrink: 0;
}

.footer-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.footer-name {
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text-color);
}

.footer-tagline {
  font-size: 0.85rem;
  color: var(--muted-text-color);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-link {
  color: var(--muted-text-color);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  position: relative;
}

.footer-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #38bdf8, #8b5cf6);
  transition: width 0.3s ease;
}

.footer-link:hover {
  color: var(--accent-color);
}

.footer-link:hover::after {
  width: 100%;
}

.footer-social {
  display: flex;
  gap: 0.75rem;
}

.social-link {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--card-color);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-color);
  text-decoration: none;
  transition: all 0.3s ease;
}

.social-link:hover {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(139, 92, 246, 0.2));
  border-color: var(--accent-color);
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.3);
}

.social-link svg {
  width: 20px;
  height: 20px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding-top: 1.5rem;
  flex-wrap: wrap;
}

.footer-copyright,
.footer-made {
  font-size: 0.85rem;
  color: var(--muted-text-color);
}

.footer-made {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.made-icon {
  font-size: 1rem;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* Remove old footer styles */
.footer-left {
  display: none;

/* -----------------------------------
   Responsive tweaks
----------------------------------- */

@media (max-width: 640px) {
  .site-header {
    padding: 0.5rem 0.9rem;
    flex-wrap: wrap;
    gap: 0.4rem;
  }

  .main-nav {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .landing-main {
    margin: 1rem auto;
  }

  .layout {
    margin: 1rem auto 1.75rem;
    padding: 0 0.75rem;
  }

  .view-wrapper {
    margin: 1rem auto 1.75rem;
  }

  .site-footer {
    padding: 2rem 0 1rem;
  }

  .footer-container {
    padding: 0 1rem;
  }

  .footer-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }

  .footer-links {
    gap: 1rem;
  }

  .footer-social {
    margin-left: 0;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
}


/* -----------------------------------
   Login page
----------------------------------- */

.auth-container {
  max-width: 420px;
  margin: 2.5rem auto;
  padding: 1.5rem 1.75rem;
  background: var(--card-color);
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.9);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.75);
}

.auth-container h2 {
  margin-top: 0;
  margin-bottom: 1rem;
  text-align: center;
}

.auth-container .form-group {
  margin-bottom: 0.75rem;
}

.auth-container button[type="submit"] {
  width: 100%;
  margin-top: 0.5rem;
}

.error {
  margin-top: 0.5rem;
  min-height: 1.1rem;
  font-size: 0.85rem;
  color: #f97373; /* subtle red for errors */
}

/* -----------------------------------
   Contact Page (Modern Redesign)
----------------------------------- */

.view-body.contact-page {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  max-width: 100% !important;
  display: block !important;
}

.view-body.about-page {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  max-width: 100% !important;
  display: block !important;
}

/* Hero Section */
.contact-hero {
  padding: 4rem 2rem 3rem;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(2, 6, 23, 0.98) 100%) !important;
  border-bottom: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
}

.contact-hero::before {
  content: '';
  position: absolute;
  top: -30%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 20s ease-in-out infinite;
}

.contact-hero-content {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
}

.contact-hero-title {
  font-size: 3rem;
  font-weight: 800;
  background: linear-gradient(135deg, #38bdf8, #818cf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0 0 1rem;
  line-height: 1.2;
  animation: fadeInUp 0.8s ease;
}

.contact-hero-subtitle {
  font-size: 1.15rem;
  color: var(--muted-text-color);
  margin: 0;
  line-height: 1.6;
  max-width: 600px;
  margin: 0 auto;
  animation: fadeInUp 0.8s ease 0.2s backwards;
}

/* Main Content Grid */
.contact-content {
  max-width: 1200px !important;
  margin: 3rem auto !important;
  padding: 0 2rem !important;
  display: grid !important;
  grid-template-columns: 1fr 1.5fr !important;
  gap: 3rem !important;
  align-items: start !important;
}

/* Contact Info Cards */
.contact-info-section {
  display: flex !important;
  flex-direction: column !important;
  gap: 1.5rem !important;
}

.contact-info-card {
  background: var(--card-color) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 12px !important;
  padding: 1.5rem !important;
  transition: all 0.3s ease !important;
  animation: fadeInUp 0.6s ease backwards !important;
}

.contact-info-card:nth-child(1) { animation-delay: 0.1s; }
.contact-info-card:nth-child(2) { animation-delay: 0.2s; }
.contact-info-card:nth-child(3) { animation-delay: 0.3s; }
.contact-info-card:nth-child(4) { animation-delay: 0.4s; }

.contact-info-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  border-color: var(--accent-color);
}

.info-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.contact-info-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  color: var(--text-color);
}

.contact-info-card p {
  margin: 0 0 0.75rem;
  color: var(--muted-text-color);
  font-size: 0.95rem;
}

.info-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--accent-color);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: gap 0.2s ease;
}

.info-link:hover {
  gap: 0.5rem;
  text-decoration: none;
}

/* Contact Form Section */
.contact-form-section {
  animation: fadeInUp 0.6s ease 0.2s backwards !important;
}

.contact-form-card {
  background: var(--card-color) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 12px !important;
  padding: 2.5rem !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
}

.contact-form-card h2 {
  margin: 0 0 0.5rem;
  font-size: 1.75rem;
  color: var(--text-color);
}

.form-description {
  margin: 0 0 2rem;
  color: var(--muted-text-color);
  font-size: 0.95rem;
}

/* Contact Form Styles */
.contact-form {
  display: flex !important;
  flex-direction: column !important;
  gap: 1.5rem !important;
}

.form-row {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 1.5rem !important;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-color);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.required {
  color: #f87171;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
  padding: 0.875rem 1rem;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-color);
  font-size: 0.95rem;
  font-family: inherit;
  transition: all 0.2s ease;
}

.contact-form input[type="text"]:focus,
.contact-form input[type="email"]:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.1);
}

.contact-form textarea {
  resize: vertical;
  min-height: 140px;
  line-height: 1.6;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--muted-text-color);
  opacity: 0.6;
}

/* File Input Styling */
.contact-form input[type="file"] {
  padding: 0.75rem;
  background: rgba(15, 23, 42, 0.5);
  border: 1px dashed var(--border-color);
  border-radius: 8px;
  color: var(--text-color);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.contact-form input[type="file"]:hover {
  border-color: var(--accent-color);
  background: rgba(56, 189, 248, 0.05);
}

.file-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.file-icon {
  font-size: 1.1rem;
}

/* Submit Button */
.contact-submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 2.5rem;
  background: var(--accent-color);
  color: var(--primary-color);
  border: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.3);
  align-self: flex-start;
}

.contact-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(56, 189, 248, 0.4);
}

.contact-submit-btn:active {
  transform: translateY(0);
}

.btn-icon {
  transition: transform 0.3s ease;
  font-size: 1.2rem;
}

.contact-submit-btn:hover .btn-icon {
  transform: translateX(4px);
}

/* Status Messages */
.contact-status {
  padding: 1rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  display: none;
  animation: fadeInUp 0.3s ease;
}

.contact-status.success {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #86efac;
}

.contact-status.error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fecaca;
}

/* Responsive */
@media (max-width: 968px) {
  .contact-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .contact-info-section {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
}

@media (max-width: 768px) {
  .contact-hero {
    padding: 2.5rem 1rem 2rem;
  }

  .contact-hero-title {
    font-size: 2rem;
  }

  .contact-hero-subtitle {
    font-size: 1rem;
  }

  .contact-content {
    padding: 0 1rem;
    margin: 2rem auto;
  }

  .contact-info-section {
    grid-template-columns: 1fr;
  }

  .contact-form-card {
    padding: 1.5rem;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .contact-submit-btn {
    width: 100%;
  }
}

/* -----------------------------------
   About Me Page (Modern Redesign)
----------------------------------- */

.view-body.about-page {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  max-width: 100% !important;
}

/* Hero Section */
.about-hero {
  padding: 4rem 2rem 3rem !important;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(2, 6, 23, 0.98) 100%) !important;
  border-bottom: 1px solid var(--border-color) !important;
  position: relative !important;
  overflow: hidden !important;
}

.about-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 20s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-30px, 30px); }
}

.about-hero-content {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
}

.about-avatar-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
  position: relative;
}

.about-avatar {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--accent-color);
  box-shadow: 0 12px 40px rgba(56, 189, 248, 0.3), 0 0 0 8px rgba(56, 189, 248, 0.1);
  background: var(--primary-color);
  position: relative;
  z-index: 2;
  animation: fadeInScale 0.8s ease;
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.about-avatar-ring {
  position: absolute;
  width: 200px;
  height: 200px;
  border: 2px solid var(--accent-color);
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.3;
  animation: pulse-ring 2s ease-in-out infinite;
}

@keyframes pulse-ring {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.3;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.1);
    opacity: 0.1;
  }
}

.about-hero-title {
  font-size: 3rem;
  font-weight: 800;
  background: linear-gradient(135deg, #38bdf8, #818cf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0 0 0.75rem;
  line-height: 1.2;
  animation: fadeInUp 0.8s ease 0.2s backwards;
}

.about-hero-subtitle {
  font-size: 1.15rem;
  color: var(--muted-text-color);
  margin: 0;
  animation: fadeInUp 0.8s ease 0.4s backwards;
}

.about-hero-subtitle p {
  margin: 0;
}

/* Stats Bar */
.about-stats {
  display: flex !important;
  justify-content: center !important;
  gap: 4rem !important;
  padding: 2.5rem 2rem !important;
  background: rgba(15, 23, 42, 0.5) !important;
  border-bottom: 1px solid var(--border-color) !important;
}

.about-stat {
  text-align: center;
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards;
}

.about-stat-value {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--accent-color);
  line-height: 1;
  display: block;
  margin-bottom: 0.5rem;
}

.about-stat-label {
  font-size: 0.9rem;
  color: var(--muted-text-color);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Content Wrapper */
.about-content-wrapper {
  max-width: 1100px !important;
  margin: 0 auto !important;
  padding: 3rem 2rem !important;
}

.about-bio-section {
  margin-bottom: 3rem;
  text-align: center;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.section-icon {
  font-size: 1.5rem;
}

.about-bio {
  max-width: 750px;
  margin: 0 auto;
  text-align: left;
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-color);
}

.about-bio p {
  margin: 0 0 1.25rem;
}

/* Main Sections Grid */
.about-main-sections {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.about-section {
  background: var(--card-color);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.about-section .section-title {
  justify-content: flex-start;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

/* Skills List with Progress Bars */
.about-skill-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.about-skill-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.skill-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.95rem;
}

.skill-icon {
  font-size: 1.25rem;
}

.skill-name {
  flex: 1;
  font-weight: 600;
}

.skill-percent {
  font-size: 0.85rem;
  color: var(--accent-color);
  font-weight: 700;
}

.skill-bar {
  height: 8px;
  background: rgba(15, 23, 42, 0.8);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}

.skill-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-color), #818cf8);
  border-radius: 8px;
  transition: width 1.5s ease;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
}

/* Experience Timeline */
.about-timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  position: relative;
}

.about-timeline::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, var(--accent-color), rgba(56, 189, 248, 0.3));
}

.about-timeline-item {
  position: relative;
  padding-left: 40px;
  margin-bottom: 2rem;
}

.about-timeline-item:last-child {
  margin-bottom: 0;
}

.about-timeline-dot {
  position: absolute;
  left: 4px;
  top: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-color);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.2), 0 0 12px rgba(56, 189, 248, 0.6);
  z-index: 1;
}

.about-timeline-content {
  background: rgba(15, 23, 42, 0.5);
  padding: 1.25rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.about-timeline-content p {
  margin: 0.75rem 0 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--muted-text-color);
}

.about-timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
}

.about-timeline-title {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-color);
}

.about-timeline-period {
  font-size: 0.85rem;
  color: var(--accent-color);
  font-weight: 600;
}

.about-timeline-meta {
  font-size: 0.9rem;
  color: var(--muted-text-color);
  margin-top: 0.25rem;
}

.experience-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.tech-tag {
  padding: 0.3rem 0.7rem;
  background: rgba(56, 189, 248, 0.15);
  color: #7dd3fc;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

/* CTA Section */
.about-cta {
  text-align: center;
  padding: 3rem 2rem;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.05), rgba(129, 140, 248, 0.05));
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.about-cta-content h2 {
  font-size: 2rem;
  margin: 0 0 0.75rem;
  background: linear-gradient(135deg, #38bdf8, #818cf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.about-cta-content p {
  margin: 0 0 1.5rem;
  color: var(--muted-text-color);
  font-size: 1.05rem;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  background: var(--accent-color);
  color: var(--primary-color);
  border: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.3);
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(56, 189, 248, 0.4);
  text-decoration: none;
}

.cta-button span {
  transition: transform 0.3s ease;
}

.cta-button:hover span {
  transform: translateX(4px);
}

/* Responsive */
@media (max-width: 768px) {
  .about-hero {
    padding: 2.5rem 1rem 2rem;
  }

  .about-hero-title {
    font-size: 2rem;
  }

  .about-hero-subtitle {
    font-size: 1rem;
  }

  .about-avatar {
    width: 140px;
    height: 140px;
  }

  .about-avatar-ring {
    width: 160px;
    height: 160px;
  }

  .about-stats {
    gap: 2rem;
    flex-wrap: wrap;
    padding: 2rem 1rem;
  }

  .about-stat-value {
    font-size: 2rem;
  }

  .about-content-wrapper {
    padding: 2rem 1rem;
  }

  .about-main-sections {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .about-section {
    padding: 1.5rem;
  }

  .about-timeline::before {
    left: 8px;
  }

  .about-timeline-item {
    padding-left: 32px;
  }

  .about-timeline-dot {
    left: 2px;
    width: 12px;
    height: 12px;
  }

  .about-timeline-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  .about-cta {
    padding: 2rem 1rem;
  }

  .about-cta-content h2 {
    font-size: 1.5rem;
  }
}

/* Honeypot stays hidden */
.hp-field-wrapper {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* -----------------------------------
   About – Gallery
----------------------------------- */

.about-gallery-section {
  margin-top: 1.5rem;
  text-align: left;
}

.about-gallery-section h2 {
  margin-bottom: 0.75rem;
}

.about-gallery {
  margin: 0 auto;
  max-width: 520px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.75rem;
}

.about-gallery-item {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.35);
}

/* -----------------------------------
   About – Collapsible Timeline
----------------------------------- */

.about-timeline {
  list-style: none;
  padding: 0;
  margin: 0;
}

.about-timeline-item {
  margin-bottom: 0.9rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  padding-bottom: 0.6rem;
}

.about-timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0;
  background: transparent;
  border: none;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.about-timeline-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.about-timeline-meta {
  font-size: 0.8rem;
  color: var(--muted-text-color);
}

.about-timeline-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.about-timeline-period {
  font-size: 0.8rem;
  color: var(--muted-text-color);
}

.about-toggle-icon {
  font-size: 0.9rem;
  color: var(--muted-text-color);
  transition: transform 0.2s ease;
}

/* description is collapsed by default */
.about-timeline-desc {
  display: none;
  margin-top: 0.4rem;
  font-size: 0.9rem;
  line-height: 1.5;
}

/* open state */
.about-timeline-item.is-open .about-timeline-desc {
  display: block;
}

.about-timeline-item.is-open .about-toggle-icon {
  transform: rotate(45deg); /* + -> x */
}

.post-item.dragging {
  opacity: 0.5;
  background: rgba(56, 189, 248, 0.15);
  border: 2px dashed var(--accent-color);
  transform: scale(0.98);
}

.drag-handle {
  cursor: grab;
  user-select: none;
  font-size: 1.05rem;
  opacity: 0.7;
  margin-right: 0.75rem;
  transition: all 0.2s ease;
}

.drag-handle:hover {
  opacity: 1;
  color: var(--accent-color);
  transform: scale(1.1);
}

.drag-handle:active {
  cursor: grabbing;
}

.post-item.dragging,
.nav-item.dragging {
  opacity: 0.5;
  background: rgba(56, 189, 248, 0.15);
}

/* ===============================
   ADMIN – NAVIGATION PANEL
================================ */

.admin-panel {
  background: var(--card-color);
  border-radius: 18px;
  padding: 1.5rem 1.75rem;
  border: 1px solid rgba(15, 23, 42, 0.9);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.75);
}

.admin-panel .help-text {
  font-size: 0.85rem;
  color: var(--muted-text-color);
  margin-bottom: 0.75rem;
}

#nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Reuse post-item look */
.nav-item {
  background: rgba(2, 6, 23, 0.6);
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  margin-bottom: 0.6rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
}

/* Drag feedback */
.nav-item.dragging {
  opacity: 0.6;
}

/* Drag handle */
.nav-item .drag-handle {
  cursor: grab;
  user-select: none;
  font-size: 1.1rem;
  opacity: 0.8;
}

.nav-item .drag-handle:active {
  cursor: grabbing;
}

/* Nav controls */
.nav-item input[type="text"] {
  background: #020617;
  border: 1px solid rgba(51, 65, 85, 0.9);
  color: var(--text-color);
  border-radius: 0.45rem;
  padding: 0.35rem 0.5rem;
}

.nav-item input.nav-color {
  width: 120px;
}

.nav-item button.nav-save {
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  border: none;
  background: var(--accent-color);
  color: #020617;
  font-weight: 600;
  cursor: pointer;
}

.nav-item button.nav-save:hover {
  opacity: 0.92;
}

/* Nav preview row */
.nav-preview {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.25rem 0.4rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(2, 6, 23, 0.45);
}

.nav-color-chip {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  display: inline-block;
}

.nav-link-preview {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}

/* Icon picker modal */
.icon-picker-backdrop {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(2, 6, 23, 0.72);
  z-index: 9999;
  padding: 1rem;
}

.icon-picker-backdrop.open {
  display: flex;
}

.icon-picker-modal {
  width: min(720px, 100%);
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: var(--card-color);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.6);
  padding: 1rem;
}

.icon-picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.icon-picker-close {
  border: none;
  background: rgba(2, 6, 23, 0.55);
  color: var(--text-color);
  border-radius: 10px;
  padding: 0.35rem 0.6rem;
  cursor: pointer;
}

.icon-picker-search {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(51, 65, 85, 0.9);
  background: #020617;
  color: var(--text-color);
  padding: 0.55rem 0.75rem;
  margin-bottom: 0.9rem;
}

.icon-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
  gap: 0.6rem;
  max-height: 340px;
  overflow: auto;
  padding: 0.25rem;
}

.icon-choice {
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(2, 6, 23, 0.5);
  border-radius: 14px;
  padding: 0.55rem 0;
  font-size: 1.35rem;
  cursor: pointer;
}

.icon-choice:hover {
  border-color: rgba(56, 189, 248, 0.55);
}

.icon-picker-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.8rem;
}

.icon-picker-clear {
  border: none;
  background: rgba(2, 6, 23, 0.55);
  color: var(--text-color);
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  cursor: pointer;
}

.settings-import-file-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.5rem;
}

.settings-actions-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 0.9rem;
}

.settings-actions-row button {
  width: 100%;
}

@media (max-width: 560px) {
  .settings-actions-row {
    grid-template-columns: 1fr;
  }
}
.project-thumb {
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 0.5rem;
}

/* ===============================
   ADMIN LIST FORMATTING RESTORE
================================ */

.posts-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.75rem;
}

.post-item {
  background: rgba(2, 6, 23, 0.55);
  border-radius: 14px;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.28);
}

.post-item-main {
  display: grid;
  gap: 0.45rem;
}

.post-item h3 {
  margin: 0;
  font-size: 1.05rem;
}

.post-meta {
  color: var(--muted-text-color);
  font-size: 0.9rem;
}

.post-item-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.post-item-actions button {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(2, 6, 23, 0.45);
  color: var(--text-color);
  padding: 0.35rem 0.75rem;
  cursor: pointer;
}

.post-item-actions button:hover {
  border-color: rgba(56, 189, 248, 0.55);
}


/* ===============================
   PROJECT VIEW – CARD FIX
================================ */

.view-body.project-page {
  background: var(--card-color);
  border-radius: 18px;
  padding: 1.5rem;
  border: 1px solid rgba(15, 23, 42, 0.9);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.75);
}

/* ===============================
   VIEW PAGE CARD (posts/pages/projects)
================================ */

/* The main view wrapper stays normal width like other pages */
#view-main {
  max-width: 750px;
  margin: 0 auto;
  padding: 1.25rem;
}



/* Animate ONLY project view card */
.view-body.project-page {
  opacity: 0;
  transform: translateY(14px);
  animation: projectCardIn 420ms ease forwards;
}

@keyframes projectCardIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}




.password-meter {
  height: 6px;
  background: #1f2937;
  border-radius: 6px;
  overflow: hidden;
  margin-top: 6px;
}

.meter-bar {
  height: 100%;
  width: 0%;
  transition: width 0.3s ease;
}

.meter-weak { background: #f87171; }
.meter-ok { background: #fbbf24; }
.meter-strong { background: #4ade80; }

/* -----------------------------------
   Status Messages & Alerts
----------------------------------- */

.alert {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border-left: 4px solid;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.alert-success {
  background: rgba(16, 185, 129, 0.1);
  border-left-color: var(--success-color);
  color: #86efac;
}

.alert-danger {
  background: rgba(239, 68, 68, 0.1);
  border-left-color: var(--danger-color);
  color: #fecaca;
}

.alert-warning {
  background: rgba(245, 158, 11, 0.1);
  border-left-color: var(--warning-color);
  color: #fcd34d;
}

.alert-info {
  background: rgba(59, 130, 246, 0.1);
  border-left-color: var(--info-color);
  color: #93c5fd;
}

/* Badge styles */
.badge {
  display: inline-block;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.badge-primary {
  background: rgba(56, 189, 248, 0.2);
  color: #7dd3fc;
}

.badge-success {
  background: rgba(16, 185, 129, 0.2);
  color: #86efac;
}

.badge-danger {
  background: rgba(239, 68, 68, 0.2);
  color: #fecaca;
}

.badge-warning {
  background: rgba(245, 158, 11, 0.2);
  color: #fcd34d;
}
/* ===============================
   ANALYTICS DASHBOARD
================================ */

.analytics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.05), rgba(139, 92, 246, 0.05));
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
}

.stat-card:hover {
  border-color: rgba(56, 189, 248, 0.4);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(56, 189, 248, 0.2);
}

.stat-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #38bdf8, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.25rem;
}

.stat-label {
  color: var(--muted-text-color);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.chart-container {
  background: var(--card-color);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
}

.chart-container h3 {
  margin-bottom: 1rem;
  font-size: 1.1rem;
  color: var(--text-color);
}

.chart-container canvas {
  max-height: 250px;
}

/* ===============================
   MARKDOWN EDITOR
================================ */

.markdown-toolbar {
  display: flex;
  gap: 0.25rem;
  padding: 0.5rem;
  background: rgba(56, 189, 248, 0.05);
  border: 1px solid var(--border-color);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  flex-wrap: wrap;
}

.md-btn {
  padding: 0.5rem 0.75rem;
  background: var(--card-color);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-color);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: monospace;
}

.md-btn:hover {
  background: rgba(56, 189, 248, 0.1);
  border-color: var(--accent-color);
}

.md-btn.preview-toggle {
  margin-left: auto;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.1), rgba(139, 92, 246, 0.1));
  font-family: inherit;
}

.markdown-editor-container {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.markdown-editor-container.split-view {
  grid-template-columns: 1fr 1fr;
  gap: 1px;
}

.markdown-editor-container textarea {
  border-radius: 0 0 8px 8px;
  border-top: none;
  min-height: 300px;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 0.95rem;
  line-height: 1.6;
}

.markdown-editor-container.split-view textarea {
  border-radius: 0 0 0 8px;
}

.markdown-preview {
  background: var(--background-color);
  border: 1px solid var(--border-color);
  border-left: none;
  border-radius: 0 0 8px 0;
  padding: 1rem;
  overflow-y: auto;
  min-height: 300px;
  max-height: 500px;
  line-height: 1.6;
}

.markdown-preview h1 { font-size: 2rem; margin: 1rem 0 0.5rem; }
.markdown-preview h2 { font-size: 1.5rem; margin: 1rem 0 0.5rem; }
.markdown-preview h3 { font-size: 1.25rem; margin: 1rem 0 0.5rem; }
.markdown-preview p { margin: 0.5rem 0; }
.markdown-preview code {
  background: rgba(56, 189, 248, 0.1);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.9em;
}
.markdown-preview pre {
  background: rgba(0, 0, 0, 0.3);
  padding: 1rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1rem 0;
}
.markdown-preview pre code {
  background: none;
  padding: 0;
}
.markdown-preview blockquote {
  border-left: 4px solid var(--accent-color);
  padding-left: 1rem;
  margin: 1rem 0;
  color: var(--muted-text-color);
  font-style: italic;
}
.markdown-preview ul, .markdown-preview ol {
  margin: 0.5rem 0;
  padding-left: 2rem;
}
.markdown-preview a {
  color: var(--accent-color);
  text-decoration: underline;
}
.markdown-preview img {
  max-width: 100%;
  border-radius: 8px;
  margin: 1rem 0;
}

/* ===============================
   DRAG & DROP ZONE
================================ */

.upload-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.drop-zone {
  border: 2px dashed var(--border-color);
  border-radius: 12px;
  padding: 2.5rem 2rem;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.02), rgba(139, 92, 246, 0.01));
}

.drop-zone:hover {
  border-color: var(--accent-color);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.06), rgba(139, 92, 246, 0.03));
}

.drop-zone.drag-over {
  border-color: #38bdf8;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.15), rgba(139, 92, 246, 0.1));
  border-style: solid;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.1);
}

.drop-zone-content svg {
  color: var(--accent-color);
  margin-bottom: 1rem;
  opacity: 0.9;
}

.drop-zone-content p {
  margin: 0.5rem 0;
  color: var(--text-color);
}

.drop-zone-hint {
  font-size: 0.85rem;
  color: var(--muted-text-color) !important;
}

.upload-progress {
  padding: 1rem;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.08), rgba(139, 92, 246, 0.04));
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #38bdf8, #8b5cf6);
  transition: width 0.3s ease;
  width: 0%;
  border-radius: 3px;
}

#progress-text {
  font-size: 0.9rem;
  color: var(--muted-text-color);
  display: block;
}

.uploaded-images {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 0.75rem;
}

.uploaded-image-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid var(--border-color);
  background: rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
}

.uploaded-image-item:hover {
  border-color: var(--accent-color);
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.2);
}

.uploaded-image-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.uploaded-image-item .remove-image {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  background: rgba(239, 68, 68, 0.95);
  border: none;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
  transition: all 0.2s ease;
  padding: 0;
}

.uploaded-image-item .remove-image:hover {
  background: #dc2626;
  transform: scale(1.15);
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
}

.uploaded-image-item .use-as-cover {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.5rem 0.25rem;
  background: linear-gradient(180deg, transparent, rgba(56, 189, 248, 0.95));
  border: none;
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  padding-top: 1rem;
}

.uploaded-image-item .use-as-cover:hover {
  background: linear-gradient(180deg, transparent, #38bdf8);
}
  cursor: pointer;
  transition: all 0.2s ease;
}

.uploaded-image-item .use-as-cover:hover {
  background: #38bdf8;
}

/* ===============================
   REAL-TIME SEARCH
================================ */

.search-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
}

#realtime-search {
  flex: 1;
  padding: 0.75rem 1rem;
  background: var(--background-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-color);
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

#realtime-search:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.1);
}

.search-count {
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.1), rgba(139, 92, 246, 0.1));
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 0.85rem;
  color: var(--text-color);
  white-space: nowrap;
}

.posts-list .post-item.hidden {
  display: none;
}

.posts-list .post-item mark {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.3), rgba(139, 92, 246, 0.3));
  color: var(--text-color);
  padding: 0.1rem 0.2rem;
  border-radius: 3px;
}

/* ===============================
   KEYBOARD SHORTCUTS TOAST
================================ */

.shortcut-toast {
  position: fixed;
  top: 80px;
  right: 20px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.95), rgba(139, 92, 246, 0.95));
  backdrop-filter: blur(10px);
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  z-index: 10000;
  opacity: 0;
  transform: translateX(400px);
  transition: all 0.3s ease;
  pointer-events: none;
  max-width: 300px;
}

.shortcut-toast.show {
  opacity: 1;
  transform: translateX(0);
}

.shortcut-toast strong {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 1.1rem;
}

/* ===============================
   RESPONSIVE UPDATES
================================ */

@media (max-width: 768px) {
  .analytics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .charts-grid {
    grid-template-columns: 1fr;
  }
  
  .markdown-editor-container.split-view {
    grid-template-columns: 1fr;
  }
}

/* ===============================
   SKELETON LOADING STATES
================================ */

.skeleton {
  background: linear-gradient(90deg, 
    rgba(148, 163, 184, 0.1) 0%, 
    rgba(148, 163, 184, 0.2) 50%, 
    rgba(148, 163, 184, 0.1) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: 6px;
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-text {
  height: 1rem;
  margin: 0.5rem 0;
}

.skeleton-title {
  height: 1.5rem;
  width: 60%;
  margin: 0.5rem 0;
}

.skeleton-card {
  padding: 1.5rem;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  margin-bottom: 1rem;
}

/* ===============================
   ENHANCED TOAST NOTIFICATIONS
================================ */

.toast-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 400px;
}

.toast {
  padding: 1rem 1.25rem;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: var(--shadow-lg);
  animation: slideInRight 0.3s ease-out;
  border-left: 4px solid;
  backdrop-filter: blur(10px);
  background: rgba(15, 23, 42, 0.95);
}

.toast.success {
  border-left-color: var(--success-color);
}

.toast.error {
  border-left-color: var(--danger-color);
}

.toast.warning {
  border-left-color: var(--warning-color);
}

.toast.info {
  border-left-color: var(--info-color);
}

.toast-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.toast.success .toast-icon { color: var(--success-color); }
.toast.error .toast-icon { color: var(--danger-color); }
.toast.warning .toast-icon { color: var(--warning-color); }
.toast.info .toast-icon { color: var(--info-color); }

.toast-content {
  flex: 1;
}

.toast-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--text-color);
}

.toast-message {
  font-size: 0.9rem;
  color: var(--muted-text-color);
}

.toast-close {
  background: none;
  border: none;
  color: var(--muted-text-color);
  cursor: pointer;
  font-size: 1.25rem;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.toast-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-color);
}

@keyframes slideInRight {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ===============================
   PAGE TRANSITIONS & MICRO-ANIMATIONS
================================ */

.page-transition {
  animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ripple {
  position: relative;
  overflow: hidden;
}

.ripple::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.ripple:active::after {
  width: 300px;
  height: 300px;
}

button:not(.no-press-effect):active {
  transform: scale(0.97);
}

.card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* ===============================
   EMPTY STATES
================================ */

.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--muted-text-color);
}

.empty-state-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.6;
  animation: float 3s ease-in-out infinite;
}

.empty-state-title {
  font-size: 1.5rem;
  color: var(--text-color);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.empty-state-message {
  font-size: 1rem;
  margin-bottom: 1.5rem;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.empty-state-action {
  display: inline-block;
}

/* ===============================
   DARK MODE
================================ */

body.light-mode {
  --background-color: #f8fafc;
  --primary-color: #ffffff;
  --card-color: #ffffff;
  --accent-color: #0ea5e9;
  --text-color: #1e293b;
  --muted-text-color: #64748b;
  --border-color: rgba(148, 163, 184, 0.3);
}

.theme-toggle {
  background: var(--card-color);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.25rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.theme-toggle:hover {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.1);
}

.theme-toggle-icon {
  transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.theme-toggle:active .theme-toggle-icon {
  transform: rotate(360deg);
}

/* ===============================
   CUSTOM SCROLLBAR
================================ */

::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: var(--primary-color);
  border-radius: 6px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.5), rgba(139, 92, 246, 0.5));
  border-radius: 6px;
  border: 2px solid var(--primary-color);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.8), rgba(139, 92, 246, 0.8));
}

/* ===============================
   ENHANCED FOCUS STATES
================================ */

*:focus-visible {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
  border-radius: 4px;
}

button:focus-visible,
a:focus-visible {
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.3);
}

/* ===============================
   CONFIRMATION MODAL
================================ */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeIn 0.2s ease-out;
  padding: 1rem;
}

.modal {
  background: var(--card-color);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  max-width: 500px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  animation: modalSlideIn 0.3s ease-out;
  overflow: hidden;
}

@keyframes modalSlideIn {
  from {
    transform: translateY(-50px) scale(0.9);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.modal-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.modal-icon.warning { color: var(--warning-color); }
.modal-icon.danger { color: var(--danger-color); }
.modal-icon.info { color: var(--info-color); }
.modal-icon.success { color: var(--success-color); }

.modal-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-color);
  margin: 0;
}

.modal-body {
  padding: 1.5rem;
  color: var(--muted-text-color);
  line-height: 1.6;
}

.modal-footer {
  padding: 1rem 1.5rem;
  background: rgba(148, 163, 184, 0.05);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

.modal-footer button {
  padding: 0.625rem 1.25rem;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.modal-footer .btn-cancel {
  background: transparent;
  color: var(--muted-text-color);
  border: 1px solid var(--border-color);
}

.modal-footer .btn-cancel:hover {
  background: rgba(148, 163, 184, 0.1);
  border-color: var(--text-color);
  color: var(--text-color);
}

.modal-footer .btn-confirm {
  background: linear-gradient(135deg, var(--accent-color), #8b5cf6);
  color: white;
}

.modal-footer .btn-confirm:hover {
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.4);
  transform: translateY(-2px);
}

.modal-footer .btn-confirm.danger {
  background: linear-gradient(135deg, var(--danger-color), #dc2626);
}

/* ===============================
   AUTO-SAVE INDICATOR
================================ */

.autosave-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--muted-text-color);
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  background: rgba(56, 189, 248, 0.05);
  border: 1px solid var(--border-color);
}

.autosave-indicator.saving {
  color: var(--warning-color);
  border-color: var(--warning-color);
}

.autosave-indicator.saved {
  color: var(--success-color);
  border-color: var(--success-color);
}

.autosave-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid var(--border-color);
  border-top-color: var(--warning-color);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===============================
   BULK ACTIONS
================================ */

.bulk-actions-bar {
  position: sticky;
  top: 80px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.15), rgba(139, 92, 246, 0.15));
  backdrop-filter: blur(10px);
  border: 1px solid var(--accent-color);
  border-radius: 12px;
  padding: 1rem 1.5rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  animation: slideInDown 0.3s ease-out;
  z-index: 100;
}

@keyframes slideInDown {
  from {
    transform: translateY(-20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.bulk-actions-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--text-color);
  font-weight: 500;
}

.bulk-actions-buttons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.bulk-actions-buttons button {
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.post-checkbox {
  width: 20px;
  height: 20px;
  accent-color: var(--accent-color);
  cursor: pointer;
}

/* ===============================
   QUICK EDIT
================================ */

.quick-edit-form {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem;
  background: rgba(56, 189, 248, 0.05);
  border-radius: 8px;
  margin-top: 0.5rem;
}

.quick-edit-form input {
  padding: 0.5rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--card-color);
  color: var(--text-color);
  font-size: 0.9rem;
}

.quick-edit-form button {
  padding: 0.5rem 1rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
}

/* ===============================
   IMAGE PREVIEW MODAL
================================ */

.image-preview-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.3s ease-out;
  padding: 2rem;
}

.image-preview-content {
  max-width: 90vw;
  max-height: 90vh;
  position: relative;
}

.image-preview-content img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.image-preview-close {
  position: absolute;
  top: -40px;
  right: -40px;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.image-preview-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

/* ===============================
   FILTER UI
================================ */

.filters-bar {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1rem;
  background: rgba(56, 189, 248, 0.03);
  border-radius: 12px;
  margin-bottom: 1rem;
  border: 1px solid var(--border-color);
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.filter-label {
  font-size: 0.75rem;
  color: var(--muted-text-color);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.filter-group select,
.filter-group input {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--card-color);
  color: var(--text-color);
  font-size: 0.9rem;
  min-width: 150px;
}

.filter-group select:focus,
.filter-group input:focus {
  border-color: var(--accent-color);
}

.filter-clear {
  align-self: flex-end;
  padding: 0.5rem 1rem;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--muted-text-color);
  cursor: pointer;
  font-size: 0.875rem;
  transition: all 0.2s ease;
}

.filter-clear:hover {
  border-color: var(--accent-color);
  color: var(--text-color);
}

/* ===============================
   AUTOCOMPLETE
================================ */

.autocomplete-wrapper {
  position: relative;
}

.autocomplete-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--card-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-top: 0.25rem;
  max-height: 200px;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  animation: slideInDown 0.2s ease-out;
}

.autocomplete-item {
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-color);
}

.autocomplete-item:hover {
  background: rgba(56, 189, 248, 0.1);
}

.autocomplete-item.selected {
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-color);
}

.autocomplete-count {
  font-size: 0.75rem;
  color: var(--muted-text-color);
  background: rgba(148, 163, 184, 0.1);
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
}

/* ===============================
   READING TIME & WORD COUNTER
================================ */

.editor-stats {
  display: flex;
  gap: 1.5rem;
  padding: 0.75rem 1rem;
  background: rgba(56, 189, 248, 0.05);
  border-radius: 8px;
  margin-top: 0.5rem;
  border: 1px solid var(--border-color);
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.stat-icon {
  font-size: 1rem;
}

.stat-label {
  color: var(--muted-text-color);
}

.stat-value {
  color: var(--text-color);
  font-weight: 600;
}

/* ===============================
   KEYBOARD SHORTCUTS PANEL
================================ */

.shortcuts-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--card-color);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  animation: modalSlideIn 0.3s ease-out;
}

.shortcuts-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  background: var(--card-color);
  z-index: 1;
}

.shortcuts-header h3 {
  margin: 0;
  font-size: 1.25rem;
  color: var(--text-color);
}

.shortcuts-body {
  padding: 1.5rem;
}

.shortcuts-group {
  margin-bottom: 1.5rem;
}

.shortcuts-group:last-child {
  margin-bottom: 0;
}

.shortcuts-group-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted-text-color);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.shortcut-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.shortcut-item:hover {
  background: rgba(56, 189, 248, 0.05);
}

.shortcut-description {
  color: var(--text-color);
  font-size: 0.9rem;
}

.shortcut-keys {
  display: flex;
  gap: 0.25rem;
}

.key {
  padding: 0.25rem 0.5rem;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.1), rgba(139, 92, 246, 0.1));
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-color);
  min-width: 28px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* ===============================
   RECENT ACTIVITY FEED
================================ */

.activity-feed {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.activity-item {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background: var(--card-color);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  transition: all 0.2s ease;
}

.activity-item:hover {
  border-color: var(--accent-color);
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.1);
}

.activity-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.activity-icon.created {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success-color);
}

.activity-icon.updated {
  background: rgba(59, 130, 246, 0.1);
  color: var(--info-color);
}

.activity-icon.deleted {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger-color);
}

.activity-icon.published {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning-color);
}

.activity-content {
  flex: 1;
}

.activity-title {
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 0.25rem;
}

.activity-description {
  font-size: 0.875rem;
  color: var(--muted-text-color);
  margin-bottom: 0.5rem;
}

.activity-time {
  font-size: 0.75rem;
  color: var(--muted-text-color);
}

.activity-link {
  color: var(--accent-color);
  text-decoration: none;
  font-size: 0.875rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.5rem;
  transition: all 0.2s ease;
}

.activity-link:hover {
  text-decoration: underline;
}
  }
  
  .markdown-editor-container.split-view textarea {
    border-radius: 0;
  }
  
  .markdown-preview {
    border-left: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 8px 8px;
  }
  
  .markdown-toolbar {
    gap: 0.25rem;
  }
  
  .md-btn {
    padding: 0.4rem 0.6rem;
    font-size: 0.85rem;
  }
}