/* =========================================================
   AETHER DESIGN SYSTEM — SIGNATURE DESIGN TOKENS
   Tailored for BesysTech (besys.tech) & James De Guzman
   ========================================================= */
:root {
  color-scheme: dark;

  /* --- Foundations & Surfaces --- */
  --aether-canvas: #090d16;
  --aether-surface: #0f172a;
  --aether-surface-raised: #1e293b;
  --aether-surface-glass: rgba(15, 23, 42, 0.78);
  --aether-surface-card: rgba(18, 26, 46, 0.92);
  --aether-surface-modal: rgba(15, 23, 42, 0.96);
  --aether-surface-input: rgba(30, 41, 59, 0.7);

  /* --- Borders --- */
  --aether-border-subtle: rgba(255, 255, 255, 0.08);
  --aether-border-medium: rgba(255, 255, 255, 0.16);
  --aether-border-accent: rgba(56, 189, 248, 0.4);

  /* --- Typography & Text Contrast --- */
  --aether-text: #f8fafc;
  --aether-text-body: #e2e8f0;
  --aether-text-secondary: #cbd5e1;
  --aether-text-muted: #94a3b8;
  --aether-text-accent: #38bdf8;

  /* --- Signature Brand Accents --- */
  --aether-accent: #38bdf8;
  --aether-accent-hover: #0ea5e9;
  --aether-accent-soft: rgba(56, 189, 248, 0.14);
  --aether-accent-secondary: #6366f1;
  --aether-accent-gradient: linear-gradient(135deg, #0284c7 0%, #6366f1 100%);
  --aether-accent-gradient-hover: linear-gradient(135deg, #0ea5e9 0%, #4f46e5 100%);
  --aether-focus: #38bdf8;

  /* --- Fonts --- */
  --aether-font-display: "Poppins", system-ui, -apple-system, sans-serif;
  --aether-font-body: "Roboto", "Inter", system-ui, -apple-system, sans-serif;
  --aether-font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;

  /* --- Typographic Scale --- */
  --aether-text-xs: 0.75rem;
  --aether-text-sm: 0.875rem;
  --aether-text-base: 1rem;
  --aether-text-lg: 1.125rem;
  --aether-text-xl: 1.35rem;
  --aether-text-2xl: 1.85rem;
  --aether-text-3xl: clamp(2.2rem, 5vw, 3.8rem);

  /* --- Spacing Scale --- */
  --aether-space-1: 0.25rem;
  --aether-space-2: 0.5rem;
  --aether-space-3: 0.75rem;
  --aether-space-4: 1rem;
  --aether-space-6: 1.5rem;
  --aether-space-8: 2rem;
  --aether-space-12: 3rem;
  --aether-space-16: 4rem;
  --aether-space-24: 6rem;

  /* --- Geometry (Radii) --- */
  --aether-radius-sm: 0.375rem;
  --aether-radius-md: 0.75rem;
  --aether-radius-lg: 1.125rem;
  --aether-radius-xl: 1.5rem;
  --aether-radius-pill: 9999px;

  /* --- Elevation & Shadows --- */
  --aether-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --aether-shadow-md: 0 10px 30px -5px rgba(0, 0, 0, 0.45);
  --aether-shadow-lg: 0 20px 45px -10px rgba(0, 0, 0, 0.65);
  --aether-shadow-glow: 0 0 25px rgba(56, 189, 248, 0.25);

  /* --- Motion & Transitions --- */
  --aether-duration-fast: 160ms;
  --aether-duration-normal: 240ms;
  --aether-ease: cubic-bezier(0.16, 1, 0.3, 1);

  /* --- Layout Constraints --- */
  --aether-content-width: 1200px;
  --aether-showcase-width: 1400px;
  --aether-page-gutter: clamp(1rem, 4vw, 3rem);

  /* Backward Compatibility Aliases */
  --bg-main: var(--aether-surface-raised);
  --bg-glass: var(--aether-surface-glass);
  --bg-footer: var(--aether-canvas);
  --bg-card: var(--aether-surface-card);
  --text-main: var(--aether-text-body);
  --text-muted: var(--aether-text-muted);
  --text-accent: var(--aether-accent);
  --border-soft: var(--aether-border-subtle);
  --radius-sm: var(--aether-radius-sm);
  --radius-md: var(--aether-radius-md);
  --radius-lg: var(--aether-radius-lg);
  --shadow-soft: var(--aether-shadow-md);
  --primary-font: var(--aether-font-body);
}

/* =========================================================
   AETHER INTERACTION & ACCESSIBILITY BASELINE
   ========================================================= */
:where(
  a,
  button,
  input,
  select,
  textarea,
  [tabindex]:not([tabindex="-1"])
):focus-visible {
  outline: 2px solid var(--aether-focus);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (prefers-reduced-motion: no-preference) {
  :where(
    a,
    button,
    input,
    select,
    textarea,
    [role="button"]
  ) {
    transition:
      color var(--aether-duration-fast) ease,
      background-color var(--aether-duration-fast) ease,
      border-color var(--aether-duration-fast) ease,
      box-shadow var(--aether-duration-fast) ease;
  }
}

/* =========================================================
   RESET & FOUNDATIONS
   ========================================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: var(--aether-font-body);
  background-color: var(--aether-canvas);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(56, 189, 248, 0.08), transparent 70%),
    radial-gradient(ellipse 60% 40% at 50% 100%, rgba(99, 102, 241, 0.06), transparent 70%);
  background-attachment: fixed;
  color: var(--aether-text-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Page Wrapper */
.page-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: transparent;
}

main {
  flex: 1;
  background: transparent;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--aether-font-display);
  color: var(--aether-text);
  font-weight: 700;
  line-height: 1.25;
  margin: 0;
}

p {
  color: var(--aether-text-body);
  margin: 0;
}

/* =========================================================
   HEADER (GLASS STYLE)
   ========================================================= */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
}

#header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;

  backdrop-filter: blur(14px);
  background: var(--bg-glass);
  border-bottom: 1px solid var(--border-soft);
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
}

/* Desktop Nav */
.header-center {
  display: none;
}

.nav-links {
  display: flex;
  gap: 5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-links a {
  font-weight: 500;
  color: var(--text-muted);
}

.nav-links a:hover {
  color: var(--text-accent);
}

/* Right Actions */
.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.dashboard-link {
  font-size: 0.9rem;
  color: var(--text-accent);
}

/* Hamburger Button */
#menu {
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  position: relative;
  cursor: pointer;
}

#menu::before,
#menu::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  height: 2px;
  background: white;
}

#menu::before {
  top: 14px;
}

#menu::after {
  bottom: 14px;
}

/* =========================================================
   MOBILE SLIDE MENU
   ========================================================= */
#mobile-nav {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 320px;
  height: 100vh;
  background: #020617;
  padding: 4rem 1.5rem;
  transition: right 0.3s ease;
  z-index: 1100;
}

/* Open state */
#mobile-nav.open {
  right: 0;
}

/* X BUTTON */
#mobile-nav .close-btn {
  position: absolute;
  top: 1.2rem;
  right: 1.5rem;
  font-size: 1.5rem;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
}

/* Mobile Nav Links */
#mobile-nav .nav-links {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 2rem; /* make space below X */
}

#mobile-nav a {
  font-size: 1.1rem;
  color: white;
  text-decoration: none;
}

/* Overlay */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 1050;
}

.nav-overlay.active {
  opacity: 1;
  pointer-events: all;
}

/* Homepage Hero Section */
.hero {
  display: flex;
  flex-direction: column; /* stack elements vertically */
  align-items: center; /* center horizontally */
  justify-content: center; /* optional: center vertically if needed */
  text-align: center; /* center text inside elements */
  padding: 2rem 1rem; /* spacing around hero */
  gap: 1.5rem; /* spacing between child elements */
}

/* Profile wrapper */
.profile-wrapper {
  display: flex;
  flex-direction: column; /* stack image and text */
  align-items: center; /* center horizontally */
  text-align: center; /* center text */
  gap: 1rem;
  max-width: 600px; /* optional: constrain width for better readability */
  margin: 0 auto; /* center in page */
}

/* Hero heading */
.hero .hook {
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.3;
  max-width: 800px;
  margin: 0 auto;
  color: var(--text-main);
}

/* Profile image */
.profile-wrapper .profile img {
  border-radius: 12px;
  max-width: 100%;
  height: auto;
}

/* Intro paragraph */
#intro {
  font-size: 1.1rem;
  color: var(--text-main);
  line-height: 1.6;
}

/* =========================================================
   HERO / BANNER
   ========================================================= */
.banner-text {
  padding: 5rem 1.5rem 2rem;
  text-align: center;
}

.banner-text h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin: 0;
}

/* =========================================================
   CONTACT PAGE CONTENT
   ========================================================= */

/* Intro */
.contact-intro {
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
  text-align: center;
}

.contact-intro p {
  color: var(--text-muted);
  line-height: 1.7;
}

/* Reasons */
.contact-reasons {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.contact-reasons ul li {
  text-align: left;
}

.reason-card {
  background: var(--bg-card);
  padding: 1.75rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-soft);
}

.reason-card h3 {
  margin-top: 0;
}

.reason-card p {
  color: var(--text-muted);
}

/* =========================================================
   CONTACT DETAILS
   ========================================================= */
.contact-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  padding: 3rem 1.5rem 5rem;
}

.contact-section {
  display: grid;
  gap: 1.5rem;
}

.contact-section div {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.contact-item {
  font-weight: 500;
}

/* ============================
   About Page Styles (Dark Theme)
   ============================ */

/* ============================
   About & Editorial Styles
   ============================ */
.my-profile {
  border: none;
  margin: var(--aether-space-8) 0;
  max-width: 65ch;
  line-height: 1.7;
}

/* Banner Text */
.banner-text {
  text-align: center;
  padding: 5rem 1.5rem 3rem 1.5rem;
  background: transparent;
}

.banner-text h1 {
  font-family: var(--aether-font-display);
  font-weight: 700;
  font-size: var(--aether-text-3xl);
  margin: 0;
  color: var(--aether-text);
  letter-spacing: -0.02em;
}

/* Bottom Section / Main Content */
.bottom-section {
  max-width: var(--aether-content-width);
  width: 90%;
  margin: 0 auto;
  padding: 3rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: var(--aether-space-8);
  align-items: center;
}

.bottom-section h2 {
  font-size: var(--aether-text-2xl);
  font-weight: 700;
  text-align: center;
  color: var(--aether-text);
  letter-spacing: -0.01em;
}

/* Profile Image */
.profile2 {
  display: flex;
  justify-content: center;
  margin: var(--aether-space-6) 0;
}

.profile2 img {
  border-radius: 50%;
  width: 180px;
  height: 180px;
  object-fit: cover;
  border: 2px solid var(--aether-border-accent);
  box-shadow: var(--aether-shadow-glow);
}

/* ================= CAROUSEL ================== */

.carousel-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  overflow: hidden;
  margin-top: 2rem;
  max-width: 100vw;
  width: 100%;
}

.carousel {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  width: 90%;
  max-width: 90vw;
}

.carousel::-webkit-scrollbar {
  display: none;
}

.carousel-btn:not(.carousel-nav-btn) {
  background-color: #333;
  color: white;
  border: none;
  padding: 1rem;
  font-size: 1.5rem;
  cursor: pointer;
  border-radius: 5px;
}

/* =========================================================
   PORTFOLIO MODERN SHOWCASE & KINETIC CAROUSEL
   ========================================================= */

.hero-tag {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 4px 14px;
  border-radius: 9999px;
  margin-bottom: 0.75rem;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: #94a3b8;
  max-width: 650px;
  margin: 0 auto 1.5rem auto;
  line-height: 1.6;
}

.portfolio-showcase-section {
  max-width: 1300px;
  margin: 0 auto 4rem auto;
  padding: 0 1.5rem;
}

.showcase-header {
  margin-bottom: 1.5rem;
  text-align: center;
}

.showcase-header h2 {
  font-size: 1.85rem;
  font-weight: 700;
  color: #f8fafc;
  margin: 0 0 0.5rem 0;
  letter-spacing: -0.02em;
}

.bottom-section.portfolio-showcase-section {
  max-width: 1400px;
  width: 96%;
  margin: 0 auto 4rem auto;
  padding: 2rem 0.5rem 4rem 0.5rem;
}

.showcase-header {
  margin-bottom: 2rem;
  text-align: center;
}

.showcase-header h2 {
  font-size: 2rem;
  font-weight: 700;
  color: #ffffff !important;
  margin: 0 0 0.5rem 0;
  letter-spacing: -0.02em;
}

.showcase-subtext {
  font-size: 1rem;
  color: #cbd5e1;
  margin: 0;
}

/* Modern Segmented Control Toolbar */
.portfolio-view-toolbar {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 1.35rem;
}

.view-toggle-bar,
.view-segmented-control {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9999px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.view-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: none;
  border-radius: 9999px;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  outline: none;
}

.view-toggle-btn svg {
  width: 1.15rem;
  height: 1.15rem;
  stroke: currentColor;
  transition: stroke 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.view-toggle-btn:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.08);
}

.view-toggle-btn.active {
  background: #2563eb;
  color: #ffffff !important;
  box-shadow: 0 0 12px rgba(37, 99, 235, 0.4);
}

.view-toggle-btn.active svg {
  stroke: #ffffff;
}

.view-toggle-btn:focus-visible {
  outline: 2px solid var(--aether-focus, #38bdf8);
  outline-offset: 2px;
}

/* Modern Carousel Track & Outer Clearance */
.modern-carousel-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1rem;
  width: 100%;
  max-width: 100%;
  padding: 0 4.25rem; /* Dedicated side padding so arrows never sit on top of cards */
  box-sizing: border-box;
}

#portfolio-carousel.modern-carousel,
.carousel.modern-carousel {
  display: flex;
  gap: 1.5rem; /* Exact 24px spacing between cards */
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding: 1.5rem 0.5rem 2.25rem 0.5rem;
  width: 100%;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
  box-sizing: border-box;
  transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

#portfolio-carousel.view-transitioning {
  opacity: 0;
  transform: scale(0.985);
}

#portfolio-carousel.modern-carousel::-webkit-scrollbar,
.carousel.modern-carousel::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

/* Kinetic Navigation Arrows - Positioned outside the card track */
.carousel-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  color: #ffffff !important;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.6), 0 0 15px rgba(56, 189, 248, 0.2);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
              background 0.2s ease,
              border-color 0.2s ease,
              box-shadow 0.2s ease,
              color 0.2s ease;
  z-index: 25;
  animation: none !important;
}

.carousel-nav-btn.prev {
  left: 0.5rem;
}

.carousel-nav-btn.next {
  right: 0.5rem;
}

.carousel-nav-btn:hover {
  background: rgba(56, 189, 248, 0.25);
  border-color: rgba(56, 189, 248, 0.7);
  color: #38bdf8 !important;
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 0 25px rgba(56, 189, 248, 0.45);
  animation: none !important;
}

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

/* Sleek Glassmorphic Card (rounded-2xl) */
.modern-portfolio-card {
  position: relative;
  flex: 0 0 360px;
  min-width: 330px;
  max-width: 380px;
  scroll-snap-align: center;
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.75) 0%, rgba(15, 23, 42, 0.88) 100%) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 1.25rem !important; /* rounded-2xl */
  box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.55);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.3s ease;
  outline: none;
}

/* Overlay pseudo-elements must never block clicks */
.modern-portfolio-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

/* Ensure Buttons and Interactive Elements Have Proper Stacking */
.portfolio-card a,
.portfolio-card button,
.portfolio-card .card-actions,
.portfolio-card .live-demo-btn,
.portfolio-card .code-btn,
.modern-portfolio-card a,
.modern-portfolio-card button,
.modern-portfolio-card .card-actions,
.modern-portfolio-card .btn-action,
.modern-portfolio-card .card-image-link {
  position: relative;
  z-index: 20;
  pointer-events: auto;
  cursor: pointer;
}

.modern-portfolio-card:hover,
.modern-portfolio-card:focus-within {
  border-color: rgba(56, 189, 248, 0.5) !important;
  box-shadow: 0 22px 45px -10px rgba(0, 0, 0, 0.75),
              0 0 28px rgba(56, 189, 248, 0.22);
}

/* Card Media / Image */
.card-media-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #090d16;
}

.card-image-link {
  display: block;
  width: 100%;
  height: 100%;
}

.portfolio-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.modern-portfolio-card:hover .portfolio-card-img {
  transform: scale(1.07);
}

.card-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, transparent 40%, rgba(15, 23, 42, 0.85) 100%);
  pointer-events: none;
}

/* Discreet Glowing Views Pill Badge */
.views-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #ffffff !important; /* Crisp white text */
  background: rgba(10, 15, 30, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1.5px solid rgba(56, 189, 248, 0.65); /* Distinct glowing cyan border */
  border-radius: 9999px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4), 0 0 15px rgba(56, 189, 248, 0.35);
  z-index: 5;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.views-badge .views-count {
  color: #ffffff !important;
}

.views-badge.updated {
  transform: scale(1.12);
  box-shadow: 0 0 25px rgba(56, 189, 248, 0.7);
}

.views-icon {
  stroke: #38bdf8;
  filter: drop-shadow(0 0 3px rgba(56, 189, 248, 0.7));
}

/* Category Pill Badge */
.category-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #ffffff !important; /* Crisp white text */
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1.5px solid rgba(147, 197, 253, 0.5); /* Distinct light blue border */
  border-radius: 9999px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  z-index: 5;
}

/* Card Databox / Content - High Contrast Typography */
/* Card Databox / Content - High Contrast Typography */
.modern-databox {
  padding: 1.25rem 0 1.35rem 0;
  display: flex;
  flex-direction: column;
  flex: 1;
  box-sizing: border-box;
}

.card-info-wrap {
  padding: 0 1.25rem;
  box-sizing: border-box;
  width: 100%;
}

.modern-portfolio-card .card-title,
.modern-portfolio-card h3,
#portfolio-carousel .card h3 {
  font-size: 1.35rem !important;
  font-weight: 700 !important;
  color: #ffffff !important; /* High contrast crisp white */
  margin: 0 0 0.6rem 0 !important;
  line-height: 1.35 !important;
  text-align: left !important;
  letter-spacing: -0.01em;
}

.modern-portfolio-card .card-desc,
.modern-portfolio-card p,
#portfolio-carousel .card p {
  font-size: 0.92rem !important;
  color: #cbd5e1 !important; /* Readable silver / light slate */
  line-height: 1.6 !important;
  margin: 0 0 1.35rem 0 !important;
  text-align: left !important;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-grow: 1;
}

/* Action Buttons & Card Footer Meta */
.card-actions-col {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  width: 100%;
  box-sizing: border-box;
}

/* Container wrapping 'Live Demo' and 'Code' */
.portfolio-card .card-actions,
.portfolio-card .card-buttons,
.portfolio-card .portfolio-actions,
.modern-portfolio-card .card-actions,
.modern-portfolio-card .card-buttons,
.modern-portfolio-card .portfolio-actions,
.card-actions,
.portfolio-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem; /* Consistent spacing between buttons */
  width: 100%;
  box-sizing: border-box;
  padding: 0 1.25rem; /* Ensures equal padding from left and right edges */
  margin-top: 1.25rem;
  position: relative;
  z-index: 20;
}

.card-footer-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.85rem;
  padding: 0.75rem 1.25rem 0 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.8rem;
  color: #94a3b8; /* slate-400 */
  position: relative;
  z-index: 10;
  pointer-events: auto;
  box-sizing: border-box;
  width: 100%;
}

.view-count-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #38bdf8; /* soft sky-blue */
  font-weight: 500;
  transition: transform 0.3s ease, color 0.3s ease;
}

.view-count-badge.updated {
  transform: scale(1.08);
  color: #67e8f9;
}

.view-count-badge .eye-icon {
  stroke: currentColor;
  flex-shrink: 0;
}

.category-tag {
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.08);
  white-space: nowrap;
}

/* Ensure both buttons flex uniformly without breaking the right edge */
.portfolio-card .btn-primary,
.portfolio-card .btn-secondary,
.portfolio-card .btn-action,
.modern-portfolio-card .btn-primary,
.modern-portfolio-card .btn-secondary,
.modern-portfolio-card .btn-action,
.portfolio-actions a,
.portfolio-actions button,
.card-actions a,
.card-actions button,
.btn-action {
  flex: 1 1 0; /* Distribute equal width across both buttons */
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 0.85rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 0.65rem;
  box-sizing: border-box;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-action.btn-primary,
.portfolio-card .btn-primary,
.modern-portfolio-card .btn-primary,
.card-actions .btn-primary,
.portfolio-actions .btn-primary {
  background: linear-gradient(135deg, #0284c7 0%, #6366f1 100%);
  color: #ffffff !important;
  border: none;
  box-shadow: 0 4px 15px rgba(2, 132, 199, 0.35);
}

.btn-action.btn-primary:hover,
.portfolio-card .btn-primary:hover,
.modern-portfolio-card .btn-primary:hover,
.card-actions .btn-primary:hover,
.portfolio-actions .btn-primary:hover {
  background: linear-gradient(135deg, #0ea5e9 0%, #4f46e5 100%);
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.5);
  transform: translateY(-2px);
}

.btn-action.btn-secondary,
.portfolio-card .btn-secondary,
.modern-portfolio-card .btn-secondary,
.card-actions .btn-secondary,
.portfolio-actions .btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
}

.btn-action.btn-secondary:hover,
.portfolio-card .btn-secondary:hover,
.modern-portfolio-card .btn-secondary:hover,
.card-actions .btn-secondary:hover,
.portfolio-actions .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(56, 189, 248, 0.5);
  color: #38bdf8 !important;
  transform: translateY(-2px);
}

/* Active Dot Indicators */
.carousel-dots-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 1.75rem;
}

.carousel-dot {
  width: 9px;
  height: 9px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.25);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.carousel-dot:hover {
  background: rgba(56, 189, 248, 0.6);
  transform: scale(1.25);
}

.carousel-dot.active {
  width: 30px;
  background: linear-gradient(90deg, #38bdf8, #818cf8);
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.7);
}

/* Responsive adjustments for modern portfolio showcase */
@media (max-width: 768px) {
  .modern-carousel-wrapper {
    padding: 0 3.25rem;
  }
  .carousel-nav-btn {
    width: 42px;
    height: 42px;
  }
  .carousel-nav-btn.prev {
    left: 0.25rem;
  }
  .carousel-nav-btn.next {
    right: 0.25rem;
  }
  .modern-portfolio-card {
    flex: 0 0 300px;
    min-width: 280px;
    max-width: 320px;
  }
}

@media (max-width: 540px) {
  .modern-carousel-wrapper {
    padding: 0 2.25rem;
  }
  .carousel-nav-btn {
    width: 36px;
    height: 36px;
  }
  .carousel-nav-btn.prev {
    left: 0;
  }
  .carousel-nav-btn.next {
    right: 0;
  }
  .modern-portfolio-card {
    flex: 0 0 calc(100vw - 7rem);
    min-width: 240px;
    max-width: 320px;
  }
}

/* =========================================================
   PORTFOLIO VIEW MODES: GRID & LIST
   ========================================================= */

/* GRID MODE */
.portfolio-showcase-section.mode-grid .modern-carousel-wrapper {
  padding: 0 !important;
  display: block !important;
  width: 100% !important;
}

.portfolio-showcase-section.mode-grid .carousel-nav-btn,
.portfolio-showcase-section.mode-grid .carousel-dots-container {
  display: none !important;
}

.portfolio-showcase-section.mode-grid #portfolio-carousel {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)) !important;
  gap: 1.5rem !important;
  overflow-x: visible !important;
  scroll-snap-type: none !important;
  padding: 1.5rem 0 2rem 0 !important;
  width: 100% !important;
}

.portfolio-showcase-section.mode-grid .modern-portfolio-card {
  flex: none !important;
  min-width: 0 !important;
  max-width: none !important;
  width: 100% !important;
  scroll-snap-align: none !important;
}

/* LIST MODE */
.portfolio-showcase-section.mode-list .modern-carousel-wrapper {
  padding: 0 !important;
  display: block !important;
  width: 100% !important;
}

.portfolio-showcase-section.mode-list .carousel-nav-btn,
.portfolio-showcase-section.mode-list .carousel-dots-container {
  display: none !important;
}

.portfolio-showcase-section.mode-list #portfolio-carousel {
  display: flex !important;
  flex-direction: column !important;
  gap: 1.25rem !important;
  overflow-x: visible !important;
  scroll-snap-type: none !important;
  padding: 1.5rem 0 2rem 0 !important;
  width: 100% !important;
}

.portfolio-showcase-section.mode-list .modern-portfolio-card {
  flex: none !important;
  min-width: 0 !important;
  max-width: none !important;
  width: 100% !important;
  scroll-snap-align: none !important;
  flex-direction: row !important;
  align-items: center !important;
  padding: 1rem 1.25rem !important;
  gap: 1.5rem !important;
  border-radius: 1.25rem !important;
}

.portfolio-showcase-section.mode-list .card-media-wrapper {
  flex: 0 0 240px !important;
  width: 240px !important;
  height: 150px !important;
  aspect-ratio: auto !important;
  border-radius: 0.85rem !important;
  overflow: hidden !important;
}

.portfolio-showcase-section.mode-list .modern-databox {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex: 1 1 auto !important;
  padding: 0 !important;
  gap: 1.5rem !important;
}

.portfolio-showcase-section.mode-list .card-info-wrap {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  padding: 0 !important;
}

.portfolio-showcase-section.mode-list .card-title {
  margin-bottom: 0.35rem !important;
  font-size: 1.25rem !important;
}

.portfolio-showcase-section.mode-list .card-desc {
  margin-bottom: 0 !important;
  font-size: 0.9rem !important;
  -webkit-line-clamp: 2 !important;
  line-clamp: 2 !important;
}

.portfolio-showcase-section.mode-list .card-actions-col {
  flex: 0 0 160px !important;
  margin-top: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 0.5rem !important;
  padding: 0 !important;
}

.portfolio-showcase-section.mode-list .card-actions,
.portfolio-showcase-section.mode-list .portfolio-actions {
  flex: 0 0 auto !important;
  margin-top: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 0.6rem !important;
  width: 100% !important;
  padding: 0 !important;
}

.portfolio-showcase-section.mode-list .btn-action {
  width: 100% !important;
  padding: 0.55rem 0.9rem !important;
  text-align: center !important;
}

.portfolio-showcase-section.mode-list .card-footer-meta {
  width: 100% !important;
  margin-top: 0.4rem !important;
  padding-top: 0.45rem !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* Responsive adjustments for List Mode on tablets & mobile */
@media (max-width: 768px) {
  .portfolio-showcase-section.mode-list .modern-portfolio-card {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 1rem !important;
    padding: 0.85rem !important;
  }

  .portfolio-showcase-section.mode-list .card-media-wrapper {
    flex: none !important;
    width: 100% !important;
    height: 180px !important;
  }

  .portfolio-showcase-section.mode-list .modern-databox {
    flex-direction: column !important;
    align-items: stretch !important;
    padding: 0 !important;
    gap: 1rem !important;
  }

  .portfolio-showcase-section.mode-list .card-actions {
    flex-direction: row !important;
    width: 100% !important;
  }
}

.card:not(.modern-portfolio-card) {
  position: relative;
  min-width: 280px;
  max-width: 300px;
  flex-shrink: 0;
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.card:not(.modern-portfolio-card)::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.card:not(.modern-portfolio-card):hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.card:not(.modern-portfolio-card) img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.card:not(.modern-portfolio-card) .databox {
  padding: 12px 15px;
}

.card:not(.modern-portfolio-card) h3 {
  font-size: 1.1rem;
  margin: 0 0 5px 0;
  color: #222;
}

.card:not(.modern-portfolio-card) p {
  font-size: 0.9rem;
  color: #555;
  line-height: 1.4;
  margin: 0;
}

/* Responsive adjustments */
@media (max-width: 600px) {
  .card:not(.modern-portfolio-card) {
    min-width: 220px;
    max-width: 240px;
  }
  .card:not(.modern-portfolio-card) img {
    height: 140px;
  }
}

/* Add this animation */
@keyframes wiggle {
  0% {
    transform: rotate(0deg);
  }

  15% {
    transform: rotate(-5deg);
  }

  30% {
    transform: rotate(5deg);
  }

  45% {
    transform: rotate(-5deg);
  }

  60% {
    transform: rotate(5deg);
  }

  75% {
    transform: rotate(-3deg);
  }

  100% {
    transform: rotate(0deg);
  }
}

.carousel-btn:not(.carousel-nav-btn):hover {
  background-color: #555;
  animation: wiggle 0.6s ease-in-out;
  transition: background-color 0.3s ease;
}

/* ================= JOIN FORM ================= */

form.join-form {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin: 2.2rem auto;
  max-width: 70vw;
  width: 70%;
}

label {
  margin: 10px 0;
  font-weight: bold;
  font-size: 0.8rem;
  font-family: Arial, Helvetica, sans-serif;
}

input,
select,
textarea {
  padding: 12px;
  margin: 8px 0;
  width: 100%;
  border-radius: 5px;
  font-size: 1rem;
  box-sizing: border-box;
}

/* Input and Select Height */
input[type="text"],
input[type="email"],
select {
  height: 44px;
}

/* Ensure typed input text and active text are crisp white */
.login-card input[type="email"],
.login-card input[type="password"],
.login-card input,
.login-form input,
#loginForm input {
  color: #ffffff !important;
  caret-color: #3b82f6; /* Blue cursor matching your accent */
}

/* Ensure placeholder text stays legible muted slate */
.login-card input::placeholder,
.login-form input::placeholder,
#loginForm input::placeholder {
  color: #94a3b8;
  opacity: 1;
}

/* Chrome/Brave/Edge autofill override */
.login-card input:-webkit-autofill,
.login-card input:-webkit-autofill:hover, 
.login-card input:-webkit-autofill:focus,
.login-form input:-webkit-autofill,
.login-form input:-webkit-autofill:hover,
.login-form input:-webkit-autofill:focus,
#loginForm input:-webkit-autofill,
#loginForm input:-webkit-autofill:hover,
#loginForm input:-webkit-autofill:focus {
  -webkit-text-fill-color: #ffffff !important;
  -webkit-box-shadow: 0 0 0px 1000px #1e293b inset !important;
  box-shadow: 0 0 0px 1000px #1e293b inset !important;
  caret-color: #3b82f6;
  transition: background-color 5000s ease-in-out 0s;
}

fieldset {
  border-radius: 5px;
  border: 1px solid var(--aether-border-subtle, rgba(255, 255, 255, 0.1));
  display: flex;
  flex-direction: column;
  margin: 0 auto;
  max-width: 100vw;
  width: 100%;
}

fieldset label {
  text-align: start;
  font-family: inherit;
}

/* Button Styling */
button {
  cursor: pointer;
  width: auto;
  font-size: 1rem;
  border: none;
}

.radio-label {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  margin: 15px 0;
  font-size: 1rem;
}

.radio-label:checked {
  background-color: #76cf9f;
  border-color: #666;
}

.radio-label:focus {
  outline: 2px dashed #666;
}

input[type="radio"] {
  margin-right: 8px;
}

.contact-section {
  align-content: baseline;
  background-color: white;
  border-radius: 5px;
  display: flex;
  flex-direction: column;
  height: auto;
  justify-content: left;
  max-width: 80vw;
  padding: 1rem;
  margin: 0.5rem;
  width: 100%;
}

#mobile,
#telephone,
#email {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  /* left-align content */
  gap: 1rem;
  font-size: 1rem;
  /* background-color: #4cae4c; */
  max-width: 100vw;
  width: 100%;
  color: black;
}

.contact-wrapper {
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  align-content: flex-start;
  font-size: 1rem;
  margin-bottom: 10px;
  padding: 10px 0;
}

.contact-section label,
.contact-section div {
  margin: 5px 0;
  max-width: 100%;
  font-weight: bold;
}

.contact-section textarea {
  width: 200px;
  height: 70px;
  max-width: 100%;
  margin: 0 auto;
  resize: none;
  padding: 5px;
}

.contact-section #submit {
  padding: 10px 20px;
  background-color: rebeccapurple;
  color: whitesmoke;
  border-radius: 5px;
  margin: 20px auto;
  max-width: 120px;
}

/* input[type="text"],
input[type="email"] {

    margin: 0 10px;
} */

.databox {
  display: flex;
  flex-direction: column;
  justify-content: left;
  align-items: center;
  margin: 0 auto;
  max-width: 100%;
  width: 100%;
  gap: 10px;
}

.card:not(.modern-portfolio-card) .databox p {
  font-size: 0.8rem;
}

.card:not(.modern-portfolio-card) .databox h3 {
  font-size: 0.9rem;
}

.dropdown-container {
  display: flex;
  justify-content: center;
  align-content: center;
  width: 50%;
  max-width: 50vw;
}

.dropdown-container select {
  height: 44px;
  font-size: 0.7rem;
  border-radius: 5px;
  margin: 0;
  padding: 0;
  margin-bottom: 10px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
  background-color: #f4f4f4;
}

#results {
  margin-top: 20px;
  font-size: medium;
  font-weight: 600;
}

.wireframe {
  background-color: #931621ff;
  border-radius: 5px;
  text-align: center;
  color: white;
}

.wireframe a {
  color: white;
}

.wireframe ul li {
  width: 200px;
}

.wireframe a:hover {
  color: yellow;
  text-decoration: none;
}

.back {
  margin-top: 10px;
  padding: 10px 10px;
  background-color: #931621ff;
  border-radius: 5px;
  text-align: center;
  color: whitesmoke;
}

.back a {
  color: white;
}

.back a:hover {
  color: white;
  border-bottom: 2px solid yellow;
}

.back a:focus {
  outline: 2px solid white;
  outline-offset: 2px;
}

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  background: var(--bg-footer);
  border-top: 1px solid var(--border-soft);
}

.footer-inner {
  max-width: 1200px;
  margin: auto;
  padding: 3rem 1.5rem;
  display: grid;
  gap: 2.5rem;
}

.footer-brand p {
  color: var(--text-muted);
  max-width: 300px;
}

.footer-nav ul {
  list-style: none;
  padding: 0;
}

.footer-nav li {
  margin-bottom: 0.6rem;
}

.footer-nav a {
  color: var(--text-muted);
}

.footer-nav a:hover {
  color: var(--text-accent);
}

.footer-social img {
  width: 28px;
}

.social-icons {
  display: flex;
  gap: 1rem;
}

/* Bottom Bar */
.footer-bottom {
  border-top: 1px solid var(--border-soft);
  padding: 1rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ================== AETHER MODAL & DIALOGS ================== */

.backdrop,
.modal-backdrop,
.quote-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(2, 6, 23, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  z-index: 998;
  pointer-events: auto;
  transition: opacity var(--aether-duration-normal) ease;
}

.backdrop.active,
.backdrop.open,
.modal-backdrop.active,
.modal-backdrop.open,
.quote-overlay.active,
.quote-overlay.open {
  display: block !important;
}

.modal.hidden,
.quote-modal-dialog.hidden {
  display: none !important;
}

.modal,
.quote-modal-dialog {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  overflow-y: auto;
  pointer-events: auto;
}

.modal.active,
.modal.open,
.quote-modal-dialog.active,
.quote-modal-dialog.open {
  display: flex !important;
}

.modal-content {
  position: relative;
  z-index: 1001;
  max-height: 90vh;
  overflow-y: auto;
  background-color: var(--aether-surface-modal);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--aether-border-medium);
  padding: 2.5rem 2rem 2rem;
  border-radius: var(--aether-radius-lg);
  box-shadow: var(--aether-shadow-lg), 0 0 35px rgba(56, 189, 248, 0.15);
  max-width: 520px;
  width: 92%;
  margin: auto;
  text-align: left;
  font-family: var(--aether-font-body);
  font-size: 1rem;
  color: var(--aether-text);
  pointer-events: auto;
  animation: modalFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-content h2 {
  text-align: center;
  font-size: 1.6rem;
  font-family: var(--aether-font-display);
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--aether-text);
}

.modal-content label {
  color: var(--aether-text-secondary);
  font-size: var(--aether-text-sm);
  font-weight: 500;
  margin-bottom: 0.35rem;
  display: block;
}

.modal-content input,
.modal-content textarea {
  background: var(--aether-surface-input);
  border: 1px solid var(--aether-border-subtle);
  border-radius: var(--aether-radius-md);
  color: var(--aether-text);
  padding: 0.75rem 1rem;
  font-family: var(--aether-font-body);
  font-size: 0.95rem;
  width: 100%;
  margin-bottom: 1rem;
  outline: none;
  transition: border-color var(--aether-duration-fast) ease, box-shadow var(--aether-duration-fast) ease;
}

.modal-content input:focus,
.modal-content textarea:focus {
  border-color: var(--aether-accent);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.25);
}

.close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  font-size: 1.75rem;
  line-height: 1;
  font-weight: 300;
  color: var(--aether-text-muted);
  cursor: pointer;
  z-index: 10;
  user-select: none;
  -webkit-user-select: none;
  transition: color var(--aether-duration-fast) ease, transform var(--aether-duration-fast) ease;
}

.close:hover {
  color: var(--aether-text);
  transform: scale(1.1);
}

fieldset {
  border: 1px solid var(--aether-border-subtle);
  border-radius: var(--aether-radius-md);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

#message {
  width: 100%;
  resize: vertical;
  min-height: 100px;
}

/* ================== OVERHAULED QUOTE MODAL DIALOG ================== */

.quote-modal,
.quote-dialog-content {
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1.25rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), 0 0 25px rgba(59, 130, 246, 0.15);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 2.25rem;
  max-width: 480px;
  width: 90%;
  margin: auto;
  overflow: hidden; /* Remove ugly native scrollbars */
}

/* Ensure modal wrapper positions dialog correctly without nested cards */
#quote-modal.modal,
.quote-modal.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  overflow-y: auto;
  pointer-events: auto;
  background: transparent;
  border: none;
  box-shadow: none;
}

#quote-modal.active,
#quote-modal.open,
.quote-modal.active,
.quote-modal.open {
  display: flex !important;
}

/* Remove any inner container wrapping form fields */
.quote-modal fieldset,
.quote-dialog-content fieldset,
#quote-modal fieldset,
#quoteForm fieldset,
.quote-form-card,
.modal-inner {
  border: none !important;
  background: transparent !important;
  background-color: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
  box-shadow: none !important;
  width: 100% !important;
  max-width: 100% !important;
}

/* Clean Typography: Header */
.quote-modal h2,
.quote-dialog-content h2,
#quote-modal h2,
#quoteForm h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #ffffff;
  text-align: center;
  margin-bottom: 1.5rem;
  font-family: var(--aether-font-display, inherit);
}

/* High-Contrast Labels */
.quote-modal label,
.quote-dialog-content label,
#quote-modal label,
#quoteForm label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #cbd5e1;
  margin-bottom: 0.4rem;
  text-align: left;
  font-family: var(--aether-font-body, inherit);
}

/* Modern Input & Textarea Fields */
.quote-modal input,
.quote-modal textarea,
.quote-dialog-content input,
.quote-dialog-content textarea,
#quote-modal input,
#quote-modal textarea,
#quoteForm input,
#quoteForm textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 0.65rem;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 0.95rem;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  margin-bottom: 1rem;
  height: auto;
  font-family: inherit;
}

.quote-modal input:focus,
.quote-modal textarea:focus,
.quote-dialog-content input:focus,
.quote-dialog-content textarea:focus,
#quote-modal input:focus,
#quote-modal textarea:focus,
#quoteForm input:focus,
#quoteForm textarea:focus {
  border-color: #3b82f6;
  background: rgba(30, 41, 59, 0.95);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

.quote-modal input::placeholder,
.quote-modal textarea::placeholder,
.quote-dialog-content input::placeholder,
.quote-dialog-content textarea::placeholder,
#quote-modal input::placeholder,
#quote-modal textarea::placeholder,
#quoteForm input::placeholder,
#quoteForm textarea::placeholder {
  color: #64748b;
}

.quote-modal textarea,
.quote-dialog-content textarea,
#quote-modal textarea,
#quoteForm textarea {
  min-height: 100px;
  resize: vertical;
}

/* Full-Width Submit Button (Fix Small Square Constraint) */
.quote-modal button[type="submit"],
.quote-dialog-content button[type="submit"],
#quote-modal button[type="submit"],
#quoteForm button[type="submit"],
.quote-submit-btn,
#submit-enquiry {
  width: 100%;
  max-width: none !important;
  height: auto !important;
  padding: 0.85rem 1.5rem;
  margin-top: 0.75rem;
  font-size: 1rem;
  font-weight: 600;
  color: #ffffff !important;
  background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 0.75rem !important;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35) !important;
  cursor: pointer;
  display: flex !important;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.quote-modal button[type="submit"]:hover,
.quote-dialog-content button[type="submit"]:hover,
#quote-modal button[type="submit"]:hover,
#quoteForm button[type="submit"]:hover,
.quote-submit-btn:hover,
#submit-enquiry:hover {
  background: linear-gradient(135deg, #3b82f6, #2563eb) !important;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5) !important;
  transform: translateY(-1px);
}

/* Close Button Alignment */
.quote-modal .close,
.quote-dialog-content .close,
#quote-modal .close,
#close-btn {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  font-size: 1.5rem;
  line-height: 1;
  color: #94a3b8;
  cursor: pointer;
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  width: auto;
  max-width: none;
  height: auto;
  z-index: 10;
  transition: color 0.2s ease, transform 0.2s ease;
}

.quote-modal .close:hover,
.quote-dialog-content .close:hover,
#quote-modal .close:hover,
#close-btn:hover {
  color: #ffffff;
  transform: scale(1.1);
}


/* Harmonized AETHER Primary Action Button */
.mybutton {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  background: var(--aether-accent-gradient);
  color: #ffffff !important;
  border: none;
  border-radius: var(--aether-radius-md);
  padding: 0.8rem 2rem;
  font-family: var(--aether-font-display);
  font-size: var(--aether-text-base);
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  width: fit-content;
  box-shadow: 0 4px 15px rgba(2, 132, 199, 0.35);
  transition: all var(--aether-duration-normal) var(--aether-ease);
}

.mybutton:hover {
  background: var(--aether-accent-gradient-hover);
  box-shadow: 0 6px 22px rgba(14, 165, 233, 0.5);
  transform: translateY(-2px);
}

.mybutton:focus-visible {
  outline: 2px solid var(--aether-focus);
  outline-offset: 3px;
}

/* ---------- DASHBOARD CONTENT ---------- */
.dashboard-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  padding: 2rem 3rem;
}

.dashboard-content .card {
  background-color: var(--aether-surface-card);
  border: 1px solid var(--aether-border-subtle);
  border-radius: var(--aether-radius-lg);
  padding: 1.75rem;
  box-shadow: var(--aether-shadow-sm);
  transition: transform 0.25s var(--aether-ease), border-color 0.25s ease, box-shadow 0.25s ease;
}

.dashboard-content .card:hover {
  transform: translateY(-4px);
  border-color: var(--aether-border-accent);
  box-shadow: var(--aether-shadow-md);
}

.dashboard-content .card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--aether-text);
}

.dashboard-content .card p {
  font-size: 0.95rem;
  color: var(--aether-text-secondary);
}

.status.ok {
  color: var(--aether-accent);
  font-weight: 600;
}

#top-save-portfolio-btn {
  margin-bottom: 1rem;
}

#status,
#status2 {
  font-size: 1rem;
  color: var(--aether-text);
}

/* ---------- QUICK ACTIONS SECTION ---------- */
.quick-actions {
  padding: 2rem 3rem 3rem;
}

.quick-actions h2 {
  font-family: var(--aether-font-display);
  font-size: 1.6rem;
  color: var(--aether-accent);
  margin-bottom: 1rem;
}

.actions-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ---------- BUTTONS ---------- */
.btn-primary,
.btn-secondary,
.btn-logout {
  font-family: var(--aether-font-display);
  font-size: 0.95rem;
  padding: 0.8rem 1.6rem;
  border-radius: var(--aether-radius-md);
  cursor: pointer;
  transition: all var(--aether-duration-fast) var(--aether-ease);
  white-space: nowrap;
  min-width: 160px;
  text-align: center;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-primary {
  background: var(--aether-accent-gradient);
  color: #fff !important;
  border: none;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
}

.btn-primary:hover {
  background: var(--aether-accent-gradient-hover);
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.5);
  transform: translateY(-2px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--aether-border-medium);
  color: var(--aether-text) !important;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--aether-accent);
  transform: translateY(-2px);
}

.btn-logout {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5 !important;
}

.btn-logout:hover {
  background: rgba(239, 68, 68, 0.3);
  color: #ffffff !important;
  transform: translateY(-2px);
}

/* AUTH STYLES */

.auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 60vh;
  padding: 2rem;
}

.auth-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2.5rem;
  gap: 1.25rem;
  background-color: var(--aether-surface-card);
  border: 1px solid var(--aether-border-subtle);
  border-radius: var(--aether-radius-lg);
  box-shadow: var(--aether-shadow-md);
  color: var(--aether-text);
  font-size: 1rem;
  max-width: 420px;
  width: 100%;
}

.auth-card p {
  font-size: 1rem;
}

#user-name2,
#user-email {
  font-size: 1rem;
}

.profile-info p {
  font-size: 1rem;
}

/* ===============================
   Confetti Styles (Multi-Color)
================================ */

.confetti-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 0;
  pointer-events: none;
  overflow: visible;
  z-index: 9999;
}

.confetti {
  position: absolute;
  top: -10px;
  width: 8px;
  height: 14px;
  opacity: 0.9;
  background-color: red; /* default, will be overridden by JS */
  border-radius: 2px;
  animation: fall var(--duration, 5s) linear forwards;
  transform: translateX(var(--x-start, 0)) rotate(0deg);
}

/* Confetti falling animation */
@keyframes fall {
  0% {
    transform: translateX(var(--x-start, 0)) translateY(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateX(calc(var(--x-start, 0) + var(--x-end, 0)))
      translateY(100vh) rotate(720deg); /* spins while falling */
    opacity: 0;
  }
}

/* =========================================================
   DESKTOP BREAKPOINT
   ========================================================= */
@media (min-width: 970px) {
  .header-center {
    display: block;
  }

  #menu {
    display: none;
  }

  .contact-reasons {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-inner {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 680px) {
  .hero .hook {
    font-size: 1.5rem;
  }
  .modal-content {
    width: 90%;
    max-width: 90vw;
  }
}

/* ================== CAROUSEL: SMALL DEVICES ================== */
@media (max-width: 600px) {
  .portfolio-showcase-section {
    padding: 0 0.75rem;
    width: 100%;
  }

  .modern-portfolio-card {
    flex: 0 0 85vw;
    min-width: 280px;
    max-width: 340px;
  }

  .carousel-nav-btn {
    display: none; /* Rely on fluid kinetic touch scrolling */
  }

  .showcase-header h2 {
    font-size: 1.4rem;
  }

  .showcase-subtext {
    font-size: 0.85rem;
  }
}
