/* ===========================
   NEO-BRUTALIST DESIGN SYSTEM
   Color Palette:
   - Primary: #FFD500 (Yellow)
   - Background: #000000 (Black)
   - Text: #FFFFFF (White)
   - Accent: #FFD500 (Yellow)
   =========================== */

:root {
  /* Dark Theme (Default) */
  --brutalist-yellow: #FFD500;
  --brutalist-black: #000000;
  --brutalist-white: #FFFFFF;
  --brutalist-shadow: 8px 8px 0px rgba(255, 213, 0, 1);
  --brutalist-border: 4px solid var(--brutalist-black);
  --glass-bg: rgba(0, 0, 0, 0.7);
  --glass-border: rgba(255, 213, 0, 0.3);

  /* Theme Variables */
  --bg-primary: #000000;
  --bg-secondary: #1a1a1a;
  --text-primary: #FFFFFF;
  --text-secondary: #cccccc;
  --accent-primary: #FFD500;
  --accent-secondary: #FFC700;
  --shadow-color: rgba(255, 213, 0, 1);
  --glass-overlay: rgba(0, 0, 0, 0.7);
}

/* Light Theme */
:root[data-theme="light"],
html[data-theme="light"] {
  --brutalist-yellow: #000000;
  --brutalist-black: #FFFFFF;
  --brutalist-white: #000000;
  --brutalist-shadow: 8px 8px 0px rgba(0, 0, 0, 1);
  --brutalist-border: 4px solid var(--brutalist-yellow);
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(0, 0, 0, 0.3);

  /* Theme Variables */
  --bg-primary: #FFFFFF;
  --bg-secondary: #f5f5f5;
  --text-primary: #000000;
  --text-secondary: #333333;
  --accent-primary: #FFD500;
  --accent-secondary: #FFC700;
  --shadow-color: rgba(0, 0, 0, 1);
  --glass-overlay: rgba(255, 255, 255, 0.7);
}

/* Smooth theme transition */
* {
  transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

/* ===========================
   BASE BODY STYLING
   =========================== */
body {
  background-color: var(--brutalist-black);
  font-family: 'Space Mono', monospace;
  color: var(--brutalist-white);
  overflow-x: hidden;
  position: relative;
}

/* Animated gradient background */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, #000000 0%, #1a1a1a 50%, #000000 100%);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
  z-index: -2;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

video.bg-video {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -10;
  opacity: 0.15;
  pointer-events: none;
  filter: grayscale(1) contrast(1.2);
}

.body-white-text {
  background-color: var(--brutalist-black);
  font-family: 'Space Mono', monospace;
  color: var(--brutalist-white);
}

.body-black-text {
  background-color: var(--brutalist-black);
  font-family: 'Space Mono', monospace;
  color: var(--brutalist-white);
}

.body-green-text {
  background-color: var(--brutalist-black);
  font-family: 'Space Mono', monospace;
  color: var(--brutalist-yellow);
}

/* ===========================
   NAVBAR + FOOTER - FROSTED GLASS
   =========================== */
.navbar {
  background: var(--glass-bg) !important;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 4px solid var(--brutalist-yellow);
  box-shadow: 0 8px 32px rgba(255, 213, 0, 0.15);
  color: var(--brutalist-white) !important;
  transition: all 0.3s ease;
}

.navbar:hover {
  border-bottom-color: var(--brutalist-yellow);
  box-shadow: 0 12px 48px rgba(255, 213, 0, 0.25);
}

.navbar a {
  color: var(--brutalist-white) !important;
  font-weight: bold;
  position: relative;
  transition: color 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.navbar a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 3px;
  background-color: var(--brutalist-yellow);
  transition: width 0.3s ease;
}

.navbar a:hover {
  color: var(--brutalist-yellow) !important;
}

.navbar a:hover::after {
  width: 100%;
}

.footer {
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-top: 4px solid var(--brutalist-yellow);
  color: var(--brutalist-white) !important;
  font-weight: bold;
  padding: 2rem 1rem;
  margin-top: 4rem;
}

/* ===========================
   ARTICLE STYLING - BRUTALIST CARDS
   =========================== */
.article-title {
  font-size: clamp(1.2rem, 4vw, 2rem);
  font-weight: 700;
  white-space: normal;
  overflow-wrap: break-word;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
}

.article {
  border: 4px solid var(--brutalist-yellow);
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  background: var(--glass-bg);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  box-shadow: var(--brutalist-shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}

.article:hover {
  transform: translate(-4px, -4px);
  box-shadow: 12px 12px 0px rgba(255, 213, 0, 1);
}

/* Brutalist form containers */
.form-container {
  background: rgba(16, 16, 16, 0.82);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-radius: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 26px 55px rgba(0, 0, 0, 0.55);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
              box-shadow 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
              border-color 0.4s ease;
  position: relative;
  overflow: hidden;
}

.form-container::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0%, rgba(255, 213, 0, 0.12) 50%, transparent 100%);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
  pointer-events: none;
}

.form-container:hover::before {
  transform: translateX(100%);
}

.form-container:hover {
  transform: translateY(-8px);
  box-shadow: 0 36px 70px rgba(0, 0, 0, 0.65);
  border-color: rgba(255, 255, 255, 0.5);
}

.panel-container-light {
  background: var(--brutalist-white) !important;
  box-shadow: none;
}

.panel-container-light .panel-image {
  background: transparent;
}

/* --- GALLERY GRID --- */

[data-theme="light"] .form-container:not(.brutal-frame):not(.form-container-light),
:root[data-theme="light"] .form-container:not(.brutal-frame):not(.form-container-light),
html[data-theme="light"] .form-container:not(.brutal-frame):not(.form-container-light) {
  background: var(--bg-primary);
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.18);
}

[data-theme="light"] .form-container:not(.brutal-frame):not(.form-container-light):hover,
:root[data-theme="light"] .form-container:not(.brutal-frame):not(.form-container-light):hover,
html[data-theme="light"] .form-container:not(.brutal-frame):not(.form-container-light):hover {
  border-color: rgba(0, 0, 0, 0.12);
  box-shadow: 0 30px 64px rgba(0, 0, 0, 0.22);
}

/* ===========================
   RESPONSIVE ADJUSTMENTS
   =========================== */
@media (max-width: 768px) {
  .navbar-brand, .nav-link {
    font-size: 0.9rem;
  }
  .grid-layout {
    grid-template-columns: repeat(6, 1fr);
  }
}

/* ===========================
   ARTICLE IMAGE HOVER EFFECT
   =========================== */
.article-link img {
  opacity: 0.85;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  filter: grayscale(0.3) contrast(1.1);
}

.article-link:hover img {
  opacity: 1;
  filter: grayscale(0) contrast(1.2);
  transform: scale(1.02);
}

/* ===========================
   CAROUSEL IMAGES - BRUTALIST STYLE
   =========================== */
.carousel-img {
  cursor: zoom-in;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 4px solid var(--brutalist-yellow);
  border-radius: 0;
  box-shadow: 6px 6px 0px rgba(255, 213, 0, 0.8);
}

.carousel-img:hover {
  transform: translate(-3px, -3px) scale(1.02);
  box-shadow: 9px 9px 0px rgba(255, 213, 0, 1);
}

.carousel-img-white {
  cursor: zoom-in;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 4px solid var(--brutalist-yellow);
  border-radius: 0;
  box-shadow: 6px 6px 0px rgba(255, 213, 0, 0.8);
}

.carousel-img-white:hover {
  transform: translate(-3px, -3px) scale(1.02);
  box-shadow: 9px 9px 0px rgba(255, 213, 0, 1);
}

/* ===========================
   MODAL STYLING
   =========================== */
.modal-img {
  max-width: 90vw;
  max-height: 90vh;
}

.modal-backdrop {
  background-color: rgba(0, 0, 0, 0.85);
}

.modal-dialog {
  padding: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.modal-body {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===========================
   CAROUSEL CONTROLS
   =========================== */
.carousel-control-prev,
.carousel-control-next {
  width: 30%;
  background-color: rgba(213, 221, 253, 0.3); /* Match body background with some transparency */
  opacity: 1;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
  filter: invert(1);
}

/* ===========================
   DIVIDERS (HR) - BRUTALIST
   =========================== */
hr {
  border: none !important;
  height: 4px !important;
  background: var(--brutalist-yellow) !important;
  box-shadow: 0 4px 0px rgba(255, 213, 0, 0.3);
  margin: 3rem 0 !important;
  opacity: 1 !important;
}

/* ===========================
   MOSAIC VIEW (GRID PROJECTS)
   =========================== */
.mosaic-view .project-card {
  position: relative;
  overflow: hidden;
}

.mosaic-view .project-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.project-image {
  transition: opacity 0.3s ease;
  opacity: 0.75;
}

.project-card:hover .project-image {
  opacity: 1;
}

.overlay-title {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.5rem 1rem;
  background-color: rgba(0, 0, 0, 0.6);
  color: white;
  font-weight: bold;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.project-card:hover .overlay-title {
  opacity: 1;
}

/* ===========================
   LIST VIEW OVERRIDES
   =========================== */
.list-view .overlay-title {
  display: none !important;
}

.list-view .project-card {
  display: flex;
  flex-direction: row;
  align-items: center;
}

.list-view .project-card img {
  max-width: 150px;
  margin-right: 1rem;
  opacity: 1 !important;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* ===========================
   PROJECT DESCRIPTIONS
   =========================== */
.project-description {
  font-size: clamp(0.9rem, 1.5vw, 1.1rem);
  line-height: 1.5;
  text-align: justify;
  margin-bottom: 1rem;
  padding-left: 1rem;
  padding-right: 1rem;
}

.project-description-cursive {
  font-size: clamp(0.9rem, 1.5vw, 1.1rem);
  line-height: 1.5;
  text-align: justify;
  margin-bottom: 1rem;
  padding-left: 1rem;
  padding-right: 1rem;
  font-style: italic;
}

@media (min-width: 768px) {
  .project-description {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* ===========================
   HEADINGS (H1, H2, H3) - BRUTALIST
   =========================== */
h1, h2, h3 {
  font-family: 'Space Mono', monospace;
  text-transform: uppercase;
  font-weight: 700;
  border-bottom: 4px solid var(--brutalist-yellow);
  padding-bottom: 0.5em;
  margin-bottom: 1.5rem;
  color: var(--brutalist-white);
  letter-spacing: 2px;
  position: relative;
  display: inline-block;
}

h1::after, h2::after, h3::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--brutalist-yellow);
  opacity: 0.3;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
}

h2 {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
}

h3 {
  font-size: clamp(1.2rem, 3vw, 2rem);
}

h4 {
  font-family: 'Space Mono', monospace;
  color: var(--brutalist-white);
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ===========================
   BUTTONS + LANGUAGE TOGGLE - BRUTALIST
   =========================== */
.btn, #lang-toggle {
  font-family: 'Space Mono', monospace;
  border: 3px solid var(--brutalist-yellow);
  background: var(--brutalist-black);
  color: var(--brutalist-yellow);
  text-transform: uppercase;
  font-weight: bold;
  padding: 0.5rem 1.5rem;
  box-shadow: 4px 4px 0px var(--brutalist-yellow);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.btn::before, #lang-toggle::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--brutalist-yellow);
  transition: left 0.3s ease;
  z-index: -1;
}

.btn:hover, #lang-toggle:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0px var(--brutalist-yellow);
  color: var(--brutalist-black);
  border-color: var(--brutalist-yellow);
}

.btn:hover::before, #lang-toggle:hover::before {
  left: 0;
}

.btn:active, #lang-toggle:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0px var(--brutalist-yellow);
}

/* ===========================
   GRID LAYOUT SYSTEM
   =========================== */
.grid-layout {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: auto;
  gap: 1rem; /* spacing between grid items */
  align-items: stretch; /* makes all items equal height by row */
}
.col-span-1 { grid-column: span 1; }
.col-span-2 { grid-column: span 2; }
.col-span-3 { grid-column: span 3; }
.col-span-4 { grid-column: span 4; }
.col-span-5 { grid-column: span 5; }
.col-span-6 { grid-column: span 6; }
.col-span-7 { grid-column: span 7; }
.col-span-8 { grid-column: span 8; }
.col-span-9 { grid-column: span 9; }
.col-span-10 { grid-column: span 10; }
.col-span-11 { grid-column: span 11; }
.col-span-12 { grid-column: span 12; }

/* Fixed-height grid units */
.grid-h1 { height: 200px; }
.grid-h2 { height: 400px; }
.grid-h3 { height: 600px; }

/* ===========================
   IMAGE FIT HANDLING
   =========================== */
.img-fit {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  border-radius: 10px;
  display: block;
  margin: auto;
}

/* ===========================
   UTILITY: GRID CENTERING
   =========================== */
.grid-center {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* ===========================
   MODERN SCROLL ANIMATIONS
   =========================== */
.scroll-fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.scroll-fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.scroll-slide-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.scroll-slide-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.scroll-slide-right {
  opacity: 0;
  transform: translateX(50px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.scroll-slide-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* ===========================
   BRUTALIST ACCENTS & DECORATIONS
   =========================== */
.brutalist-accent {
  position: relative;
}

.brutalist-accent::before {
  content: '';
  position: absolute;
  top: -10px;
  left: -10px;
  width: 20px;
  height: 20px;
  border-top: 4px solid var(--brutalist-yellow);
  border-left: 4px solid var(--brutalist-yellow);
}

.brutalist-accent::after {
  content: '';
  position: absolute;
  bottom: -10px;
  right: -10px;
  width: 20px;
  height: 20px;
  border-bottom: 4px solid var(--brutalist-yellow);
  border-right: 4px solid var(--brutalist-yellow);
}

/* ===========================
   FLOATING ANIMATION
   =========================== */
@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

.floating {
  animation: float 3s ease-in-out infinite;
}

/* ===========================
   GLITCH EFFECT (SUBTLE)
   =========================== */
@keyframes glitch {
  0% {
    transform: translate(0);
  }
  20% {
    transform: translate(-2px, 2px);
  }
  40% {
    transform: translate(-2px, -2px);
  }
  60% {
    transform: translate(2px, 2px);
  }
  80% {
    transform: translate(2px, -2px);
  }
  100% {
    transform: translate(0);
  }
}

.glitch:hover {
  animation: glitch 0.3s ease-in-out;
}

/* ===========================
   PULSE ANIMATION
   =========================== */
@keyframes pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(255, 213, 0, 0.7);
  }
  50% {
    box-shadow: 0 0 0 15px rgba(255, 213, 0, 0);
  }
}

.pulse {
  animation: pulse 2s infinite;
}

/* ===========================
   SMOOTH SCROLLING
   =========================== */
html {
  scroll-behavior: smooth;
}

/* ===========================
   CUSTOM SCROLLBAR
   =========================== */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: var(--brutalist-black);
  border-left: 2px solid var(--brutalist-yellow);
}

::-webkit-scrollbar-thumb {
  background: var(--brutalist-yellow);
  border: 2px solid var(--brutalist-black);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--brutalist-white);
}

/* ===========================
   TEXT SELECTION
   =========================== */
::selection {
  background: var(--brutalist-yellow);
  color: var(--brutalist-black);
}

::-moz-selection {
  background: var(--brutalist-yellow);
  color: var(--brutalist-black);
}

/* ===========================
   LOADING ANIMATION
   =========================== */
@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

.shimmer {
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255, 213, 0, 0.2) 50%,
    transparent 100%);
  background-size: 1000px 100%;
  animation: shimmer 2s infinite;
}

/* ===========================
   RESPONSIVE UTILITIES
   =========================== */
@media (max-width: 768px) {
  .form-container {
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
  }

  .form-container:hover {
    transform: translateY(-4px);
    box-shadow: 0 26px 58px rgba(0, 0, 0, 0.55);
  }

  .panel-image {
    box-shadow:
      0 18px 35px rgba(0, 0, 0, 0.45),
      0 0 24px rgba(255, 213, 0, 0.25);
  }

  .panel-image:hover {
    transform: translateY(-3px);
    box-shadow:
      0 26px 48px rgba(0, 0, 0, 0.5),
      0 0 30px rgba(255, 213, 0, 0.35);
  }

  h1 {
    font-size: clamp(1.5rem, 8vw, 2.5rem);
    letter-spacing: 1px;
  }

  h2 {
    font-size: clamp(1.2rem, 6vw, 2rem);
  }

  h3 {
    font-size: clamp(1rem, 5vw, 1.5rem);
  }

  .navbar {
    border-bottom: 3px solid var(--brutalist-yellow);
  }

  .article {
    border: 3px solid var(--brutalist-yellow);
    box-shadow: 4px 4px 0px rgba(255, 213, 0, 1);
  }

  /* Disable parallax on mobile for performance */
  .scroll-fade-in,
  .scroll-slide-left,
  .scroll-slide-right {
    opacity: 1 !important;
    transform: none !important;
  }
}

@media (max-width: 480px) {
  :root {
    --brutalist-shadow: 3px 3px 0px rgba(255, 213, 0, 1);
  }

  body::before {
    animation: none;
  }

  .form-container {
    padding: 1rem !important;
  }

  .btn, #lang-toggle {
    padding: 0.4rem 1rem;
    font-size: 0.9rem;
  }
}

/* ===========================
   THEME TOGGLE - HALF/FULL CIRCLE
   =========================== */
#theme-toggle {
  width: 32px;
  height: 32px;
  border: 3px solid var(--brutalist-yellow);
  border-radius: 50%;
  background: linear-gradient(90deg, var(--brutalist-yellow) 50%, transparent 50%);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  position: relative;
  overflow: hidden;
  margin-left: 12px;
}

/* Ensure language toggle has proper spacing and size */
#lang-toggle {
  padding: 0.25rem 0.75rem !important;
  margin-left: 0.5rem;
  font-size: 0.875rem !important;
  line-height: 1.2 !important;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Align all navbar items vertically */
.navbar-nav {
  align-items: center;
}

.navbar-nav .nav-item {
  display: flex;
  align-items: center;
}

/* Half circle for dark mode, full circle for light mode */
#theme-toggle[data-theme="light"] {
  background: var(--brutalist-yellow);
}

#theme-toggle:hover {
  transform: scale(1.15) rotate(180deg);
}

#theme-toggle:active {
  transform: scale(0.95) rotate(180deg);
}

/* Pulse animation on hover */
#theme-toggle::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 3px solid var(--brutalist-yellow);
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
}

#theme-toggle:hover::after {
  opacity: 0.5;
  transform: scale(1.4);
}

/* Mobile adjustments */
@media (max-width: 768px) {
  #theme-toggle {
    width: 28px;
    height: 28px;
    border: 2px solid var(--brutalist-yellow);
  }
}

/* Light theme specific adjustments */
[data-theme="light"] body::before {
  background: linear-gradient(45deg, #FFFFFF 0%, #f0f0f0 50%, #FFFFFF 100%);
}

[data-theme="light"] video.bg-video {
  opacity: 0.08;
  filter: grayscale(1) contrast(1.2) invert(1);
}

[data-theme="light"] .navbar,
[data-theme="light"] .footer {
  background: var(--glass-overlay) !important;
  border-color: var(--brutalist-yellow) !important;
}

[data-theme="light"] .navbar a,
[data-theme="light"] .navbar-brand,
[data-theme="light"] .nav-link {
  color: var(--brutalist-white) !important;
}

[data-theme="light"] .navbar a:hover,
[data-theme="light"] .nav-link:hover {
  color: var(--brutalist-yellow) !important;
}

[data-theme="light"] .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(0, 0, 0, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

[data-theme="light"] .navbar-toggler {
  border-color: var(--brutalist-yellow) !important;
}

[data-theme="light"] .btn-outline-light {
  color: var(--brutalist-white) !important;
  border-color: var(--brutalist-white) !important;
}

[data-theme="light"] .btn-outline-light:hover {
  background-color: var(--brutalist-white) !important;
  color: var(--brutalist-black) !important;
}

[data-theme="light"] ::-webkit-scrollbar-track {
  background: #FFFFFF;
  border-left: 2px solid #000000;
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
  background: #000000;
  border: 2px solid #FFFFFF;
}

[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
  background: var(--accent-primary);
}

/* ===========================
   FORM STYLING - ALWAYS READABLE
   =========================== */
/* Form inputs should always have dark text on light background */
.form-container.brutal-frame,
.form-container.form-container-light {
  background-color: rgba(255, 255, 255, 0.95) !important;
}

.form-container.brutal-frame h1,
.form-container.brutal-frame .form-label,
.form-container.form-container-light h1,
.form-container.form-container-light .form-label {
  color: #000000 !important;
}

.form-control {
  background-color: #FFFFFF !important;
  color: #000000 !important;
  border: 2px solid #000000 !important;
}

.form-control::placeholder {
  color: #666666 !important;
}

.form-control:focus {
  background-color: #FFFFFF !important;
  color: #000000 !important;
  border-color: var(--brutalist-yellow) !important;
  box-shadow: 0 0 0 0.2rem rgba(255, 213, 0, 0.25) !important;
}

/* Dark mode: Keep forms readable */
[data-theme="dark"] .form-container.brutal-frame,
[data-theme="dark"] .form-container.form-container-light {
  background-color: rgba(255, 255, 255, 0.95) !important;
}

[data-theme="dark"] .form-container.brutal-frame h1,
[data-theme="dark"] .form-container.brutal-frame .form-label,
[data-theme="dark"] .form-container.form-container-light h1,
[data-theme="dark"] .form-container.form-container-light .form-label {
  color: #000000 !important;
}

[data-theme="dark"] .form-control {
  background-color: #FFFFFF !important;
  color: #000000 !important;
  border: 2px solid #000000 !important;
}

/* ===========================
   PRINT STYLES
   =========================== */
@media print {
  body::before,
  body::after,
  .cursor-glow,
  .theme-toggle,
  video {
    display: none !important;
  }

  .form-container {
    box-shadow: none;
    border: 2px solid black;
  }
}

/* ===========================
   BRUTALIST COMPONENT SYSTEM
   Reusable classes for consistent design
   =========================== */

/* --- FRAMES/CONTAINERS --- */
.brutal-frame {
  border: 4px solid var(--brutalist-yellow);
  background: var(--glass-bg);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  box-shadow: 8px 8px 0px var(--brutalist-white);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.brutal-frame:hover {
  transform: translate(-4px, -4px);
  box-shadow: 12px 12px 0px var(--brutalist-yellow);
}

.brutal-frame-sm {
  border: 3px solid var(--brutalist-yellow);
  box-shadow: 4px 4px 0px var(--brutalist-white);
}

.brutal-frame-sm:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0px var(--brutalist-yellow);
}

.brutal-frame-lg {
  border: 6px solid var(--brutalist-yellow);
  box-shadow: 12px 12px 0px var(--brutalist-white);
}

.brutal-frame-lg:hover {
  transform: translate(-6px, -6px);
  box-shadow: 18px 18px 0px var(--brutalist-yellow);
}

/* --- PANELS --- */
.brutal-panel {
  padding: 2rem;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 4px solid var(--brutalist-yellow);
  box-shadow: var(--brutalist-shadow);
}

.brutal-panel-solid {
  padding: 2rem;
  background: var(--brutalist-black);
  border: 4px solid var(--brutalist-yellow);
  box-shadow: var(--brutalist-shadow);
}

.brutal-panel-yellow {
  padding: 2rem;
  background: var(--brutalist-yellow);
  color: var(--brutalist-black);
  border: 4px solid var(--brutalist-black);
  box-shadow: 8px 8px 0px var(--brutalist-black);
}

/* --- CARDS --- */
.brutal-card {
  border: 4px solid var(--brutalist-yellow);
  background: var(--glass-bg);
  backdrop-filter: blur(15px);
  box-shadow: 6px 6px 0px var(--brutalist-white);
  padding: 1.5rem;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}

.brutal-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 213, 0, 0.1), transparent);
  transition: left 0.5s ease;
}

.brutal-card:hover {
  transform: translate(-3px, -3px);
  box-shadow: 9px 9px 0px var(--brutalist-yellow);
}

.brutal-card:hover::before {
  left: 100%;
}

/* --- BUTTONS --- */
.brutal-btn {
  font-family: 'Space Mono', monospace;
  border: 3px solid var(--brutalist-yellow);
  background: var(--brutalist-black);
  color: var(--brutalist-yellow);
  text-transform: uppercase;
  font-weight: bold;
  padding: 0.75rem 2rem;
  box-shadow: 4px 4px 0px var(--brutalist-yellow);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  display: inline-block;
  letter-spacing: 1px;
}

.brutal-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--brutalist-yellow);
  transition: left 0.3s ease;
  z-index: -1;
}

.brutal-btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0px var(--brutalist-yellow);
  color: var(--brutalist-black);
}

.brutal-btn:hover::before {
  left: 0;
}

.brutal-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0px var(--brutalist-yellow);
}

/* Button variants */
.brutal-btn-yellow {
  background: var(--brutalist-yellow);
  color: var(--brutalist-black);
  border-color: var(--brutalist-black);
  box-shadow: 4px 4px 0px var(--brutalist-black);
}

.brutal-btn-yellow::before {
  background: var(--brutalist-black);
}

.brutal-btn-yellow:hover {
  color: var(--brutalist-yellow);
  box-shadow: 6px 6px 0px var(--brutalist-black);
}

.brutal-btn-sm {
  padding: 0.5rem 1.5rem;
  font-size: 0.9rem;
}

.brutal-btn-lg {
  padding: 1rem 2.5rem;
  font-size: 1.2rem;
}

/* --- SECTIONS/BLOCKS --- */
.brutal-section {
  margin-bottom: 3rem;
  padding: 2rem;
  border: 4px solid var(--brutalist-yellow);
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
}

.brutal-hero {
  padding: 4rem 2rem;
  border: 6px solid var(--brutalist-yellow);
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  box-shadow: 12px 12px 0px var(--shadow-color);
  margin: 2rem 0;
  text-align: center;
}

/* --- IMAGES --- */
.panel-image {
  display: block;
  box-shadow:
    0 24px 45px rgba(0, 0, 0, 0.55),
    0 0 30px rgba(255, 213, 0, 0.28);
  transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275),
              box-shadow 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.panel-image:hover {
  transform: translateY(-6px);
  box-shadow:
    0 32px 60px rgba(0, 0, 0, 0.6),
    0 0 40px rgba(255, 213, 0, 0.45);
}

}

/* --- TEXT ACCENTS --- */
.brutal-text-yellow {
  color: var(--brutalist-yellow);
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.brutal-text-highlight {
  background: var(--brutalist-yellow);
  color: var(--brutalist-black);
  padding: 0.2rem 0.5rem;
  font-weight: bold;
  box-shadow: 2px 2px 0px var(--brutalist-black);
}

.brutal-underline {
  position: relative;
  display: inline-block;
  padding-bottom: 0.3rem;
}

.brutal-underline::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--brutalist-yellow);
  box-shadow: 0 2px 0px rgba(255, 213, 0, 0.3);
}

/* --- DIVIDERS --- */
.brutal-divider {
  border: none;
  height: 4px;
  background: var(--brutalist-yellow);
  box-shadow: 0 4px 0px rgba(255, 213, 0, 0.3);
  margin: 2rem 0;
}

.brutal-divider-thin {
  border: none;
  height: 2px;
  background: var(--brutalist-yellow);
  margin: 1rem 0;
}

/* --- LISTS --- */
.brutal-list {
  list-style: none;
  padding-left: 0;
}

.brutal-list li {
  padding: 0.5rem 0;
  padding-left: 2rem;
  position: relative;
  border-bottom: 2px solid rgba(255, 213, 0, 0.2);
}

.brutal-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--brutalist-yellow);
  font-weight: bold;
  font-size: 1.2rem;
}

.brutal-list li:last-child {
  border-bottom: none;
}

/* --- BADGES --- */
.brutal-badge {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  background: var(--brutalist-yellow);
  color: var(--brutalist-black);
  border: 2px solid var(--brutalist-black);
  font-weight: bold;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 1px;
  box-shadow: 2px 2px 0px var(--brutalist-black);
}

/* --- ALERTS/NOTIFICATIONS --- */
.brutal-alert {
  padding: 1.5rem;
  border: 4px solid var(--brutalist-yellow);
  background: var(--glass-bg);
  backdrop-filter: blur(15px);
  margin: 1rem 0;
  position: relative;
  box-shadow: 6px 6px 0px var(--shadow-color);
}

.brutal-alert::before {
  content: '!';
  position: absolute;
  top: 50%;
  left: 1rem;
  transform: translateY(-50%);
  font-size: 2rem;
  font-weight: bold;
  color: var(--brutalist-yellow);
}

.brutal-alert-content {
  padding-left: 3rem;
}

/* --- TABLES --- */
.brutal-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 4px solid var(--brutalist-yellow);
}

.brutal-table th,
.brutal-table td {
  padding: 1rem;
  border: 2px solid var(--brutalist-yellow);
  text-align: left;
}

.brutal-table th {
  background: var(--brutalist-yellow);
  color: var(--brutalist-black);
  font-weight: bold;
  text-transform: uppercase;
}

.brutal-table tr:nth-child(even) {
  background: rgba(255, 213, 0, 0.05);
}

.brutal-table tr:hover {
  background: rgba(255, 213, 0, 0.1);
}

/* --- INPUTS/FORMS --- */
.brutal-input {
  width: 100%;
  padding: 0.75rem;
  border: 3px solid var(--brutalist-yellow);
  background: var(--brutalist-black);
  color: var(--brutalist-white);
  font-family: 'Space Mono', monospace;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.brutal-input:focus {
  outline: none;
  border-color: var(--brutalist-yellow);
  box-shadow: 4px 4px 0px var(--brutalist-yellow);
  transform: translate(-2px, -2px);
}

.brutal-textarea {
  width: 100%;
  padding: 0.75rem;
  border: 3px solid var(--brutalist-yellow);
  background: var(--brutalist-black);
  color: var(--brutalist-white);
  font-family: 'Space Mono', monospace;
  font-size: 1rem;
  resize: vertical;
  min-height: 120px;
}

.brutal-textarea:focus {
  outline: none;
  border-color: var(--brutalist-yellow);
  box-shadow: 4px 4px 0px var(--brutalist-yellow);
}

/* --- LOADING STATES --- */
.brutal-loading {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 4px solid var(--brutalist-yellow);
  border-top-color: transparent;
  border-radius: 50%;
  animation: brutal-spin 1s linear infinite;
}

@keyframes brutal-spin {
  to { transform: rotate(360deg); }
}

/* --- TOOLTIPS --- */
.brutal-tooltip {
  position: relative;
  display: inline-block;
  cursor: help;
}

.brutal-tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.5rem 1rem;
  background: var(--brutalist-yellow);
  color: var(--brutalist-black);
  font-size: 0.9rem;
  font-weight: bold;
  white-space: nowrap;
  border: 3px solid var(--brutalist-black);
  box-shadow: 4px 4px 0px var(--brutalist-black);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 1000;
}

.brutal-tooltip:hover::after {
  opacity: 1;
}

/* --- PROGRESS BARS --- */
.brutal-progress {
  width: 100%;
  height: 30px;
  border: 3px solid var(--brutalist-yellow);
  background: var(--brutalist-black);
  position: relative;
  overflow: hidden;
}

.brutal-progress-bar {
  height: 100%;
  background: var(--brutalist-yellow);
  transition: width 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: var(--brutalist-black);
}

/* --- SPACING UTILITIES --- */
.brutal-mt-1 { margin-top: 0.5rem; }
.brutal-mt-2 { margin-top: 1rem; }
.brutal-mt-3 { margin-top: 2rem; }
.brutal-mt-4 { margin-top: 3rem; }

.brutal-mb-1 { margin-bottom: 0.5rem; }
.brutal-mb-2 { margin-bottom: 1rem; }
.brutal-mb-3 { margin-bottom: 2rem; }
.brutal-mb-4 { margin-bottom: 3rem; }

.brutal-p-1 { padding: 0.5rem; }
.brutal-p-2 { padding: 1rem; }
.brutal-p-3 { padding: 2rem; }
.brutal-p-4 { padding: 3rem; }

/* --- RESPONSIVE ADJUSTMENTS FOR COMPONENTS --- */
@media (max-width: 768px) {
  .brutal-frame,
  .brutal-card,
  .brutal-panel {
    border-width: 3px;
  }

  .brutal-frame {
    box-shadow: 4px 4px 0px var(--shadow-color);
  }

  .brutal-frame:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0px var(--shadow-color);
  }

  .brutal-hero {
    padding: 2rem 1rem;
    border-width: 4px;
  }

  .brutal-btn {
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .brutal-frame,
  .brutal-card,
  .brutal-panel,
  .brutal-section {
    border-width: 2px;
  }

  .brutal-frame {
    box-shadow: 3px 3px 0px var(--shadow-color);
  }

  .brutal-frame:hover {
    transform: translate(-1px, -1px);
    box-shadow: 4px 4px 0px var(--shadow-color);
  }
}
