/**
 * ScholarCSS v2.0.0
 * A Bootstrap alternative with Teenage Engineering × Academic aesthetic
 * Arctic White & Orange Theme
 */

/* ==========================================================================
   GOOGLE FONTS IMPORT
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Crimson+Pro:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ==========================================================================
   CSS RESET (Modern Normalize + Custom)
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
  -moz-tab-size: 4;
  tab-size: 4;
}

body {
  margin: 0;
  font-family: var(--scholar-font-primary);
  font-size: var(--scholar-text-base);
  font-weight: var(--scholar-font-normal);
  line-height: var(--scholar-leading-normal);
  color: var(--scholar-graphite);
  background-color: var(--scholar-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

hr {
  height: 0;
  color: inherit;
  border-top: 1px solid var(--scholar-steam);
  margin: var(--scholar-space-4) 0;
}

abbr[title] {
  text-decoration: underline dotted;
  cursor: help;
}

b,
strong {
  font-weight: var(--scholar-font-semibold);
}

code,
kbd,
samp,
pre {
  font-family: var(--scholar-font-mono);
  font-size: 0.875em;
}

small {
  font-size: 0.875em;
}

sub,
sup {
  font-size: 0.75em;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

sub {
  bottom: -0.25em;
}

sup {
  top: -0.5em;
}

table {
  text-indent: 0;
  border-color: inherit;
  border-collapse: collapse;
}

button,
input,
optgroup,
select,
textarea {
  font-family: inherit;
  font-size: 100%;
  line-height: inherit;
  color: inherit;
  margin: 0;
  padding: 0;
}

button,
select {
  text-transform: none;
}

button,
[type='button'],
[type='reset'],
[type='submit'] {
  -webkit-appearance: button;
  background-color: transparent;
  background-image: none;
  cursor: pointer;
}

:-moz-focusring {
  outline: auto;
}

:-moz-ui-invalid {
  box-shadow: none;
}

progress {
  vertical-align: baseline;
}

::-webkit-inner-spin-button,
::-webkit-outer-spin-button {
  height: auto;
}

[type='search'] {
  -webkit-appearance: textfield;
  outline-offset: -2px;
}

::-webkit-search-decoration {
  -webkit-appearance: none;
}

::-webkit-file-upload-button {
  -webkit-appearance: button;
  font: inherit;
}

summary {
  display: list-item;
}

blockquote,
dl,
dd,
h1,
h2,
h3,
h4,
h5,
h6,
hr,
figure,
p,
pre {
  margin: 0;
}

fieldset {
  margin: 0;
  padding: 0;
}

legend {
  padding: 0;
}

ol,
ul,
menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

textarea {
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  opacity: 1;
  color: var(--scholar-slate);
}

button,
[role='button'] {
  cursor: pointer;
}

:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

iframe {
  border: 0;
}

[hidden] {
  display: none !important;
}

/* Remove default focus outlines, will be handled by focus-visible */
*:focus {
  outline: none;
}

/* Visible focus for keyboard navigation */
*:focus-visible {
  outline: 2px solid var(--scholar-orange);
  outline-offset: 2px;
}

/* ==========================================================================
   CSS CUSTOM PROPERTIES (Design Tokens)
   ========================================================================== */
:root {
  /* -------------------------------------------------------------------------
     COLOR PALETTE
     ------------------------------------------------------------------------- */
  /* Arctic Whites & Grays */
  --scholar-white: #fafbfc;
  --scholar-snow: #f5f6f8;
  --scholar-steam: #eaecef;
  --scholar-fog: #d1d5db;
  --scholar-slate: #6b7280;
  --scholar-graphite: #374151;
  --scholar-ink: #1f2937;
  --scholar-void: #111827;

  /* Orange Accents (Teenage Engineering inspired) */
  --scholar-orange: #ff6b35;
  --scholar-coral: #ff8c61;
  --scholar-ember: #e85a24;
  --scholar-tangerine: #ffaa00;
  --scholar-cream: #fff5f0;

  /* Semantic Colors */
  --scholar-success: #10b981;
  --scholar-success-light: #d1fae5;
  --scholar-warning: #f59e0b;
  --scholar-warning-light: #fef3c7;
  --scholar-error: #ef4444;
  --scholar-error-light: #fee2e2;
  --scholar-info: #3b82f6;
  --scholar-info-light: #dbeafe;

  /* -------------------------------------------------------------------------
     TYPOGRAPHY
     ------------------------------------------------------------------------- */
  --scholar-font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --scholar-font-mono: 'JetBrains Mono', 'Fira Code', Consolas, Monaco, monospace;
  --scholar-font-academic: 'Crimson Pro', Georgia, 'Times New Roman', serif;

  /* Font Weights */
  --scholar-font-light: 300;
  --scholar-font-normal: 400;
  --scholar-font-medium: 500;
  --scholar-font-semibold: 600;
  --scholar-font-bold: 700;

  /* Type Scale */
  --scholar-text-xs: 0.75rem;      /* 12px */
  --scholar-text-sm: 0.875rem;     /* 14px */
  --scholar-text-base: 1rem;       /* 16px */
  --scholar-text-lg: 1.125rem;     /* 18px */
  --scholar-text-xl: 1.25rem;      /* 20px */
  --scholar-text-2xl: 1.5rem;      /* 24px */
  --scholar-text-3xl: 1.875rem;    /* 30px */
  --scholar-text-4xl: 2.25rem;     /* 36px */
  --scholar-text-5xl: 3rem;        /* 48px */
  --scholar-text-6xl: 3.75rem;     /* 60px */

  /* Line Heights */
  --scholar-leading-none: 1;
  --scholar-leading-tight: 1.25;
  --scholar-leading-snug: 1.375;
  --scholar-leading-normal: 1.6;
  --scholar-leading-relaxed: 1.625;
  --scholar-leading-loose: 2;

  /* Letter Spacing */
  --scholar-tracking-tighter: -0.05em;
  --scholar-tracking-tight: -0.025em;
  --scholar-tracking-normal: 0;
  --scholar-tracking-wide: 0.025em;
  --scholar-tracking-wider: 0.05em;
  --scholar-tracking-widest: 0.1em;

  /* -------------------------------------------------------------------------
     SPACING (4px base scale)
     ------------------------------------------------------------------------- */
  --scholar-space-0: 0;
  --scholar-space-px: 1px;
  --scholar-space-0-5: 0.125rem;   /* 2px */
  --scholar-space-1: 0.25rem;      /* 4px */
  --scholar-space-1-5: 0.375rem;   /* 6px */
  --scholar-space-2: 0.5rem;       /* 8px */
  --scholar-space-2-5: 0.625rem;   /* 10px */
  --scholar-space-3: 0.75rem;      /* 12px */
  --scholar-space-4: 1rem;         /* 16px */
  --scholar-space-5: 1.25rem;      /* 20px */
  --scholar-space-6: 1.5rem;       /* 24px */
  --scholar-space-8: 2rem;         /* 32px */
  --scholar-space-10: 2.5rem;      /* 40px */
  --scholar-space-12: 3rem;        /* 48px */
  --scholar-space-16: 4rem;        /* 64px */
  --scholar-space-20: 5rem;        /* 80px */
  --scholar-space-24: 6rem;        /* 96px */
  --scholar-space-32: 8rem;        /* 128px */

  /* -------------------------------------------------------------------------
     BREAKPOINTS
     ------------------------------------------------------------------------- */
  --scholar-breakpoint-xs: 0;
  --scholar-breakpoint-sm: 576px;
  --scholar-breakpoint-md: 768px;
  --scholar-breakpoint-lg: 992px;
  --scholar-breakpoint-xl: 1200px;
  --scholar-breakpoint-xxl: 1400px;

  /* -------------------------------------------------------------------------
     CONTAINER MAX WIDTHS
     ------------------------------------------------------------------------- */
  --scholar-container-sm: 540px;
  --scholar-container-md: 720px;
  --scholar-container-lg: 960px;
  --scholar-container-xl: 1140px;
  --scholar-container-xxl: 1320px;

  /* -------------------------------------------------------------------------
     BORDERS & SHADOWS
     ------------------------------------------------------------------------- */
  /* Border Radius (mostly sharp for TE aesthetic) */
  --scholar-radius-none: 0;
  --scholar-radius-sm: 2px;
  --scholar-radius: 4px;
  --scholar-radius-md: 6px;
  --scholar-radius-lg: 8px;
  --scholar-radius-xl: 12px;
  --scholar-radius-full: 9999px;

  /* Shadows (subtle, academic) */
  --scholar-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.03), 0 1px 3px 0 rgba(0, 0, 0, 0.02);
  --scholar-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px 0 rgba(0, 0, 0, 0.03);
  --scholar-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.03);
  --scholar-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -4px rgba(0, 0, 0, 0.03);
  --scholar-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.03);
  --scholar-shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.03);

  /* -------------------------------------------------------------------------
     TRANSITIONS & ANIMATION
     ------------------------------------------------------------------------- */
  --scholar-transition-fast: 150ms ease;
  --scholar-transition-base: 200ms ease;
  --scholar-transition-slow: 300ms ease;

  /* -------------------------------------------------------------------------
     Z-INDEX SCALE
     ------------------------------------------------------------------------- */
  --scholar-z-base: 0;
  --scholar-z-dropdown: 100;
  --scholar-z-sticky: 200;
  --scholar-z-fixed: 300;
  --scholar-z-modal-backdrop: 400;
  --scholar-z-modal: 500;
  --scholar-z-popover: 600;
  --scholar-z-tooltip: 700;
}

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

/* ==========================================================================
   SELECTION STYLING
   ========================================================================== */
::selection {
  background-color: var(--scholar-orange);
  color: var(--scholar-white);
}
/**
 * ScholarCSS Typography
 * Academic, clean, generous whitespace
 */

/* ==========================================================================
   BASE TYPOGRAPHY
   ========================================================================== */
body {
  font-family: var(--scholar-font-primary);
  font-size: var(--scholar-text-base);
  font-weight: var(--scholar-font-normal);
  line-height: var(--scholar-leading-normal);
  color: var(--scholar-graphite);
  background-color: var(--scholar-white);
}

/* ==========================================================================
   HEADINGS
   ========================================================================== */
h1, h2, h3, h4, h5, h6,
.scholar-h1, .scholar-h2, .scholar-h3, .scholar-h4, .scholar-h5, .scholar-h6 {
  margin-bottom: var(--scholar-space-4);
  font-weight: var(--scholar-font-semibold);
  line-height: var(--scholar-leading-tight);
  color: var(--scholar-ink);
  letter-spacing: var(--scholar-tracking-tight);
}

h1, .scholar-h1 {
  font-size: var(--scholar-text-4xl);
  font-weight: var(--scholar-font-bold);
  letter-spacing: var(--scholar-tracking-tighter);
}

h2, .scholar-h2 {
  font-size: var(--scholar-text-3xl);
}

h3, .scholar-h3 {
  font-size: var(--scholar-text-2xl);
}

h4, .scholar-h4 {
  font-size: var(--scholar-text-xl);
}

h5, .scholar-h5 {
  font-size: var(--scholar-text-lg);
}

h6, .scholar-h6 {
  font-size: var(--scholar-text-base);
  font-weight: var(--scholar-font-semibold);
  text-transform: uppercase;
  letter-spacing: var(--scholar-tracking-wide);
}

/* Heading with accent underline */
h2.accent::after,
.scholar-h2.accent::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background-color: var(--scholar-orange);
  margin-top: var(--scholar-space-3);
}

/* ==========================================================================
   PARAGRAPHS
   ========================================================================== */
p {
  margin-bottom: var(--scholar-space-4);
}

p:last-child {
  margin-bottom: 0;
}

/* Lead paragraph - larger intro text */
.lead {
  font-size: var(--scholar-text-xl);
  font-weight: var(--scholar-font-normal);
  line-height: var(--scholar-leading-relaxed);
  color: var(--scholar-slate);
}

/* Small text */
small, .small {
  font-size: var(--scholar-text-sm);
}

/* Muted text */
.text-muted {
  color: var(--scholar-slate);
}

/* ==========================================================================
   LINKS
   ========================================================================== */
a {
  color: var(--scholar-orange);
  text-decoration: none;
  transition: color var(--scholar-transition-fast);
}

a:hover {
  color: var(--scholar-ember);
  text-decoration: underline;
}

a:focus-visible {
  outline: 2px solid var(--scholar-orange);
  outline-offset: 2px;
  border-radius: var(--scholar-radius-sm);
}

a:not([href]):not([class]),
a:not([href]):not([class]):hover {
  color: inherit;
  text-decoration: none;
}

/* Underlined links (for content) */
.link-underline {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.link-underline:hover {
  text-decoration-thickness: 2px;
}

/* ==========================================================================
   LISTS
   ========================================================================== */
ul, ol {
  margin-bottom: var(--scholar-space-4);
  padding-left: var(--scholar-space-6);
}

ul ul, ol ol,
ul ol, ol ul {
  margin-bottom: 0;
}

li {
  margin-bottom: var(--scholar-space-1);
}

/* Unstyled lists */
.list-unstyled {
  padding-left: 0;
  list-style: none;
}

.list-unstyled li {
  margin-bottom: var(--scholar-space-2);
}

/* Inline lists */
.list-inline {
  padding-left: 0;
  list-style: none;
}

.list-inline-item {
  display: inline-block;
}

.list-inline-item:not(:last-child) {
  margin-right: var(--scholar-space-3);
}

/* Definition lists */
dl {
  margin-bottom: var(--scholar-space-4);
}

dt {
  font-weight: var(--scholar-font-semibold);
  color: var(--scholar-ink);
  margin-bottom: var(--scholar-space-1);
}

dd {
  margin-left: 0;
  margin-bottom: var(--scholar-space-3);
  color: var(--scholar-graphite);
}

/* ==========================================================================
   BLOCKQUOTES
   ========================================================================== */
blockquote {
  margin: var(--scholar-space-6) 0;
  padding: var(--scholar-space-4) var(--scholar-space-6);
  border-left: 3px solid var(--scholar-orange);
  background-color: var(--scholar-snow);
}

blockquote p {
  font-size: var(--scholar-text-lg);
  font-style: italic;
  color: var(--scholar-graphite);
  margin-bottom: var(--scholar-space-3);
}

blockquote p:last-child {
  margin-bottom: 0;
}

blockquote footer,
blockquote cite {
  font-size: var(--scholar-text-sm);
  font-style: normal;
  color: var(--scholar-slate);
}

blockquote footer::before,
blockquote cite::before {
  content: '\2014\00A0';
}

/* ==========================================================================
   CODE & PRE
   ========================================================================== */
code {
  font-family: var(--scholar-font-mono);
  font-size: 0.875em;
  color: var(--scholar-ember);
  background-color: var(--scholar-snow);
  padding: 0.2em 0.4em;
  border-radius: var(--scholar-radius-sm);
}

pre {
  font-family: var(--scholar-font-mono);
  font-size: var(--scholar-text-sm);
  background-color: var(--scholar-ink);
  color: var(--scholar-snow);
  padding: var(--scholar-space-4);
  margin-bottom: var(--scholar-space-4);
  overflow-x: auto;
  border-radius: var(--scholar-radius);
  line-height: var(--scholar-leading-relaxed);
}

pre code {
  background-color: transparent;
  color: inherit;
  padding: 0;
  font-size: inherit;
  border-radius: 0;
}

/* Keyboard input */
kbd {
  font-family: var(--scholar-font-mono);
  font-size: var(--scholar-text-sm);
  background-color: var(--scholar-ink);
  color: var(--scholar-white);
  padding: 0.2em 0.4em;
  border-radius: var(--scholar-radius-sm);
  box-shadow: var(--scholar-shadow-sm);
}

/* Sample output */
samp {
  font-family: var(--scholar-font-mono);
  font-size: 0.875em;
}

/* ==========================================================================
   MARK & HIGHLIGHT
   ========================================================================== */
mark,
.highlight {
  background-color: var(--scholar-cream);
  color: var(--scholar-ember);
  padding: 0.1em 0.2em;
}

/* ==========================================================================
   ABBREVIATIONS
   ========================================================================== */
abbr[title] {
  text-decoration: underline dotted;
  cursor: help;
  border-bottom: none;
}

/* ==========================================================================
   ADDRESSES
   ========================================================================== */
address {
  margin-bottom: var(--scholar-space-4);
  font-style: normal;
  line-height: var(--scholar-leading-relaxed);
}

/* ==========================================================================
   HORIZONTAL RULE
   ========================================================================== */
hr {
  margin: var(--scholar-space-6) 0;
  border: 0;
  border-top: 1px solid var(--scholar-steam);
}

hr.accent {
  border-top-color: var(--scholar-orange);
  border-top-width: 2px;
}

/* ==========================================================================
   TEXT UTILITIES
   ========================================================================== */

/* Alignment */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-justify { text-align: justify; }

@media (min-width: 576px) {
  .text-sm-left { text-align: left; }
  .text-sm-center { text-align: center; }
  .text-sm-right { text-align: right; }
}

@media (min-width: 768px) {
  .text-md-left { text-align: left; }
  .text-md-center { text-align: center; }
  .text-md-right { text-align: right; }
}

@media (min-width: 992px) {
  .text-lg-left { text-align: left; }
  .text-lg-center { text-align: center; }
  .text-lg-right { text-align: right; }
}

@media (min-width: 1200px) {
  .text-xl-left { text-align: left; }
  .text-xl-center { text-align: center; }
  .text-xl-right { text-align: right; }
}

/* Font weights */
.font-light { font-weight: var(--scholar-font-light); }
.font-normal { font-weight: var(--scholar-font-normal); }
.font-medium { font-weight: var(--scholar-font-medium); }
.font-semibold { font-weight: var(--scholar-font-semibold); }
.font-bold { font-weight: var(--scholar-font-bold); }

/* Text transforms */
.text-lowercase { text-transform: lowercase; }
.text-uppercase { text-transform: uppercase; }
.text-capitalize { text-transform: capitalize; }

/* Font families */
.font-sans { font-family: var(--scholar-font-primary); }
.font-mono { font-family: var(--scholar-font-mono); }
.font-serif { font-family: var(--scholar-font-academic); }

/* Text wrapping */
.text-wrap { white-space: normal; }
.text-nowrap { white-space: nowrap; }
.text-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.text-break {
  word-wrap: break-word;
  word-break: break-word;
}

/* Line heights */
.leading-none { line-height: var(--scholar-leading-none); }
.leading-tight { line-height: var(--scholar-leading-tight); }
.leading-snug { line-height: var(--scholar-leading-snug); }
.leading-normal { line-height: var(--scholar-leading-normal); }
.leading-relaxed { line-height: var(--scholar-leading-relaxed); }
.leading-loose { line-height: var(--scholar-leading-loose); }

/* Letter spacing */
.tracking-tighter { letter-spacing: var(--scholar-tracking-tighter); }
.tracking-tight { letter-spacing: var(--scholar-tracking-tight); }
.tracking-normal { letter-spacing: var(--scholar-tracking-normal); }
.tracking-wide { letter-spacing: var(--scholar-tracking-wide); }
.tracking-wider { letter-spacing: var(--scholar-tracking-wider); }
.tracking-widest { letter-spacing: var(--scholar-tracking-widest); }

/* ==========================================================================
   ACADEMIC CITATIONS
   ========================================================================== */
.citation {
  color: var(--scholar-slate);
  font-size: var(--scholar-text-sm);
}

.citation::before {
  content: '[';
}

.citation::after {
  content: ']';
}

.footnote {
  font-size: var(--scholar-text-xs);
  vertical-align: super;
  color: var(--scholar-orange);
}

/* ==========================================================================
   RESPONSIVE HEADINGS
   ========================================================================== */
@media (max-width: 767.98px) {
  h1, .scholar-h1 {
    font-size: var(--scholar-text-3xl);
  }
  
  h2, .scholar-h2 {
    font-size: var(--scholar-text-2xl);
  }
  
  h3, .scholar-h3 {
    font-size: var(--scholar-text-xl);
  }
  
  .lead {
    font-size: var(--scholar-text-lg);
  }
}
/**
 * ScholarCSS Grid System
 * 12-column responsive grid with academic spacing
 */

/* ==========================================================================
   CONTAINER
   ========================================================================== */
.container,
.container-fluid,
.container-sm,
.container-md,
.container-lg,
.container-xl,
.container-xxl {
  width: 100%;
  padding-right: var(--scholar-space-4);
  padding-left: var(--scholar-space-4);
  margin-right: auto;
  margin-left: auto;
}

@media (min-width: 576px) {
  .container, .container-sm { max-width: var(--scholar-container-sm); }
}

@media (min-width: 768px) {
  .container, .container-sm, .container-md { max-width: var(--scholar-container-md); }
}

@media (min-width: 992px) {
  .container, .container-sm, .container-md, .container-lg { max-width: var(--scholar-container-lg); }
}

@media (min-width: 1200px) {
  .container, .container-sm, .container-md, .container-lg, .container-xl { max-width: var(--scholar-container-xl); }
}

@media (min-width: 1400px) {
  .container, .container-sm, .container-md, .container-lg, .container-xl, .container-xxl { max-width: var(--scholar-container-xxl); }
}

/* ==========================================================================
   ROW
   ========================================================================== */
.row {
  display: flex;
  flex-wrap: wrap;
  margin-right: calc(var(--scholar-space-3) * -1);
  margin-left: calc(var(--scholar-space-3) * -1);
}

.row > * {
  flex-shrink: 0;
  width: 100%;
  max-width: 100%;
  padding-right: var(--scholar-space-3);
  padding-left: var(--scholar-space-3);
}

/* No gutters */
.no-gutters {
  margin-right: 0;
  margin-left: 0;
}

.no-gutters > .col,
.no-gutters > [class*="col-"] {
  padding-right: 0;
  padding-left: 0;
}

/* Row columns - equal width */
.row-cols-1 > * { flex: 0 0 auto; width: 100%; }
.row-cols-2 > * { flex: 0 0 auto; width: 50%; }
.row-cols-3 > * { flex: 0 0 auto; width: 33.333333%; }
.row-cols-4 > * { flex: 0 0 auto; width: 25%; }
.row-cols-5 > * { flex: 0 0 auto; width: 20%; }
.row-cols-6 > * { flex: 0 0 auto; width: 16.666667%; }

@media (min-width: 576px) {
  .row-cols-sm-1 > * { flex: 0 0 auto; width: 100%; }
  .row-cols-sm-2 > * { flex: 0 0 auto; width: 50%; }
  .row-cols-sm-3 > * { flex: 0 0 auto; width: 33.333333%; }
  .row-cols-sm-4 > * { flex: 0 0 auto; width: 25%; }
  .row-cols-sm-5 > * { flex: 0 0 auto; width: 20%; }
  .row-cols-sm-6 > * { flex: 0 0 auto; width: 16.666667%; }
}

@media (min-width: 768px) {
  .row-cols-md-1 > * { flex: 0 0 auto; width: 100%; }
  .row-cols-md-2 > * { flex: 0 0 auto; width: 50%; }
  .row-cols-md-3 > * { flex: 0 0 auto; width: 33.333333%; }
  .row-cols-md-4 > * { flex: 0 0 auto; width: 25%; }
  .row-cols-md-5 > * { flex: 0 0 auto; width: 20%; }
  .row-cols-md-6 > * { flex: 0 0 auto; width: 16.666667%; }
}

@media (min-width: 992px) {
  .row-cols-lg-1 > * { flex: 0 0 auto; width: 100%; }
  .row-cols-lg-2 > * { flex: 0 0 auto; width: 50%; }
  .row-cols-lg-3 > * { flex: 0 0 auto; width: 33.333333%; }
  .row-cols-lg-4 > * { flex: 0 0 auto; width: 25%; }
  .row-cols-lg-5 > * { flex: 0 0 auto; width: 20%; }
  .row-cols-lg-6 > * { flex: 0 0 auto; width: 16.666667%; }
}

@media (min-width: 1200px) {
  .row-cols-xl-1 > * { flex: 0 0 auto; width: 100%; }
  .row-cols-xl-2 > * { flex: 0 0 auto; width: 50%; }
  .row-cols-xl-3 > * { flex: 0 0 auto; width: 33.333333%; }
  .row-cols-xl-4 > * { flex: 0 0 auto; width: 25%; }
  .row-cols-xl-5 > * { flex: 0 0 auto; width: 20%; }
  .row-cols-xl-6 > * { flex: 0 0 auto; width: 16.666667%; }
}

@media (min-width: 1400px) {
  .row-cols-xxl-1 > * { flex: 0 0 auto; width: 100%; }
  .row-cols-xxl-2 > * { flex: 0 0 auto; width: 50%; }
  .row-cols-xxl-3 > * { flex: 0 0 auto; width: 33.333333%; }
  .row-cols-xxl-4 > * { flex: 0 0 auto; width: 25%; }
  .row-cols-xxl-5 > * { flex: 0 0 auto; width: 20%; }
  .row-cols-xxl-6 > * { flex: 0 0 auto; width: 16.666667%; }
}

/* ==========================================================================
   COLUMNS
   ========================================================================== */
.col {
  flex: 1 0 0%;
}

.col-auto {
  flex: 0 0 auto;
  width: auto;
}

.col-1 { flex: 0 0 auto; width: 8.333333%; }
.col-2 { flex: 0 0 auto; width: 16.666667%; }
.col-3 { flex: 0 0 auto; width: 25%; }
.col-4 { flex: 0 0 auto; width: 33.333333%; }
.col-5 { flex: 0 0 auto; width: 41.666667%; }
.col-6 { flex: 0 0 auto; width: 50%; }
.col-7 { flex: 0 0 auto; width: 58.333333%; }
.col-8 { flex: 0 0 auto; width: 66.666667%; }
.col-9 { flex: 0 0 auto; width: 75%; }
.col-10 { flex: 0 0 auto; width: 83.333333%; }
.col-11 { flex: 0 0 auto; width: 91.666667%; }
.col-12 { flex: 0 0 auto; width: 100%; }

/* ==========================================================================
   RESPONSIVE COLUMNS - SM (≥576px)
   ========================================================================== */
@media (min-width: 576px) {
  .col-sm { flex: 1 0 0%; }
  .col-sm-auto { flex: 0 0 auto; width: auto; }
  .col-sm-1 { flex: 0 0 auto; width: 8.333333%; }
  .col-sm-2 { flex: 0 0 auto; width: 16.666667%; }
  .col-sm-3 { flex: 0 0 auto; width: 25%; }
  .col-sm-4 { flex: 0 0 auto; width: 33.333333%; }
  .col-sm-5 { flex: 0 0 auto; width: 41.666667%; }
  .col-sm-6 { flex: 0 0 auto; width: 50%; }
  .col-sm-7 { flex: 0 0 auto; width: 58.333333%; }
  .col-sm-8 { flex: 0 0 auto; width: 66.666667%; }
  .col-sm-9 { flex: 0 0 auto; width: 75%; }
  .col-sm-10 { flex: 0 0 auto; width: 83.333333%; }
  .col-sm-11 { flex: 0 0 auto; width: 91.666667%; }
  .col-sm-12 { flex: 0 0 auto; width: 100%; }
}

/* ==========================================================================
   RESPONSIVE COLUMNS - MD (≥768px)
   ========================================================================== */
@media (min-width: 768px) {
  .col-md { flex: 1 0 0%; }
  .col-md-auto { flex: 0 0 auto; width: auto; }
  .col-md-1 { flex: 0 0 auto; width: 8.333333%; }
  .col-md-2 { flex: 0 0 auto; width: 16.666667%; }
  .col-md-3 { flex: 0 0 auto; width: 25%; }
  .col-md-4 { flex: 0 0 auto; width: 33.333333%; }
  .col-md-5 { flex: 0 0 auto; width: 41.666667%; }
  .col-md-6 { flex: 0 0 auto; width: 50%; }
  .col-md-7 { flex: 0 0 auto; width: 58.333333%; }
  .col-md-8 { flex: 0 0 auto; width: 66.666667%; }
  .col-md-9 { flex: 0 0 auto; width: 75%; }
  .col-md-10 { flex: 0 0 auto; width: 83.333333%; }
  .col-md-11 { flex: 0 0 auto; width: 91.666667%; }
  .col-md-12 { flex: 0 0 auto; width: 100%; }
}

/* ==========================================================================
   RESPONSIVE COLUMNS - LG (≥992px)
   ========================================================================== */
@media (min-width: 992px) {
  .col-lg { flex: 1 0 0%; }
  .col-lg-auto { flex: 0 0 auto; width: auto; }
  .col-lg-1 { flex: 0 0 auto; width: 8.333333%; }
  .col-lg-2 { flex: 0 0 auto; width: 16.666667%; }
  .col-lg-3 { flex: 0 0 auto; width: 25%; }
  .col-lg-4 { flex: 0 0 auto; width: 33.333333%; }
  .col-lg-5 { flex: 0 0 auto; width: 41.666667%; }
  .col-lg-6 { flex: 0 0 auto; width: 50%; }
  .col-lg-7 { flex: 0 0 auto; width: 58.333333%; }
  .col-lg-8 { flex: 0 0 auto; width: 66.666667%; }
  .col-lg-9 { flex: 0 0 auto; width: 75%; }
  .col-lg-10 { flex: 0 0 auto; width: 83.333333%; }
  .col-lg-11 { flex: 0 0 auto; width: 91.666667%; }
  .col-lg-12 { flex: 0 0 auto; width: 100%; }
}

/* ==========================================================================
   RESPONSIVE COLUMNS - XL (≥1200px)
   ========================================================================== */
@media (min-width: 1200px) {
  .col-xl { flex: 1 0 0%; }
  .col-xl-auto { flex: 0 0 auto; width: auto; }
  .col-xl-1 { flex: 0 0 auto; width: 8.333333%; }
  .col-xl-2 { flex: 0 0 auto; width: 16.666667%; }
  .col-xl-3 { flex: 0 0 auto; width: 25%; }
  .col-xl-4 { flex: 0 0 auto; width: 33.333333%; }
  .col-xl-5 { flex: 0 0 auto; width: 41.666667%; }
  .col-xl-6 { flex: 0 0 auto; width: 50%; }
  .col-xl-7 { flex: 0 0 auto; width: 58.333333%; }
  .col-xl-8 { flex: 0 0 auto; width: 66.666667%; }
  .col-xl-9 { flex: 0 0 auto; width: 75%; }
  .col-xl-10 { flex: 0 0 auto; width: 83.333333%; }
  .col-xl-11 { flex: 0 0 auto; width: 91.666667%; }
  .col-xl-12 { flex: 0 0 auto; width: 100%; }
}

/* ==========================================================================
   RESPONSIVE COLUMNS - XXL (≥1400px)
   ========================================================================== */
@media (min-width: 1400px) {
  .col-xxl { flex: 1 0 0%; }
  .col-xxl-auto { flex: 0 0 auto; width: auto; }
  .col-xxl-1 { flex: 0 0 auto; width: 8.333333%; }
  .col-xxl-2 { flex: 0 0 auto; width: 16.666667%; }
  .col-xxl-3 { flex: 0 0 auto; width: 25%; }
  .col-xxl-4 { flex: 0 0 auto; width: 33.333333%; }
  .col-xxl-5 { flex: 0 0 auto; width: 41.666667%; }
  .col-xxl-6 { flex: 0 0 auto; width: 50%; }
  .col-xxl-7 { flex: 0 0 auto; width: 58.333333%; }
  .col-xxl-8 { flex: 0 0 auto; width: 66.666667%; }
  .col-xxl-9 { flex: 0 0 auto; width: 75%; }
  .col-xxl-10 { flex: 0 0 auto; width: 83.333333%; }
  .col-xxl-11 { flex: 0 0 auto; width: 91.666667%; }
  .col-xxl-12 { flex: 0 0 auto; width: 100%; }
}

/* ==========================================================================
   OFFSETS
   ========================================================================== */
.offset-1 { margin-left: 8.333333%; }
.offset-2 { margin-left: 16.666667%; }
.offset-3 { margin-left: 25%; }
.offset-4 { margin-left: 33.333333%; }
.offset-5 { margin-left: 41.666667%; }
.offset-6 { margin-left: 50%; }
.offset-7 { margin-left: 58.333333%; }
.offset-8 { margin-left: 66.666667%; }
.offset-9 { margin-left: 75%; }
.offset-10 { margin-left: 83.333333%; }
.offset-11 { margin-left: 91.666667%; }

@media (min-width: 576px) {
  .offset-sm-0 { margin-left: 0; }
  .offset-sm-1 { margin-left: 8.333333%; }
  .offset-sm-2 { margin-left: 16.666667%; }
  .offset-sm-3 { margin-left: 25%; }
  .offset-sm-4 { margin-left: 33.333333%; }
  .offset-sm-5 { margin-left: 41.666667%; }
  .offset-sm-6 { margin-left: 50%; }
  .offset-sm-7 { margin-left: 58.333333%; }
  .offset-sm-8 { margin-left: 66.666667%; }
  .offset-sm-9 { margin-left: 75%; }
  .offset-sm-10 { margin-left: 83.333333%; }
  .offset-sm-11 { margin-left: 91.666667%; }
}

@media (min-width: 768px) {
  .offset-md-0 { margin-left: 0; }
  .offset-md-1 { margin-left: 8.333333%; }
  .offset-md-2 { margin-left: 16.666667%; }
  .offset-md-3 { margin-left: 25%; }
  .offset-md-4 { margin-left: 33.333333%; }
  .offset-md-5 { margin-left: 41.666667%; }
  .offset-md-6 { margin-left: 50%; }
  .offset-md-7 { margin-left: 58.333333%; }
  .offset-md-8 { margin-left: 66.666667%; }
  .offset-md-9 { margin-left: 75%; }
  .offset-md-10 { margin-left: 83.333333%; }
  .offset-md-11 { margin-left: 91.666667%; }
}

@media (min-width: 992px) {
  .offset-lg-0 { margin-left: 0; }
  .offset-lg-1 { margin-left: 8.333333%; }
  .offset-lg-2 { margin-left: 16.666667%; }
  .offset-lg-3 { margin-left: 25%; }
  .offset-lg-4 { margin-left: 33.333333%; }
  .offset-lg-5 { margin-left: 41.666667%; }
  .offset-lg-6 { margin-left: 50%; }
  .offset-lg-7 { margin-left: 58.333333%; }
  .offset-lg-8 { margin-left: 66.666667%; }
  .offset-lg-9 { margin-left: 75%; }
  .offset-lg-10 { margin-left: 83.333333%; }
  .offset-lg-11 { margin-left: 91.666667%; }
}

@media (min-width: 1200px) {
  .offset-xl-0 { margin-left: 0; }
  .offset-xl-1 { margin-left: 8.333333%; }
  .offset-xl-2 { margin-left: 16.666667%; }
  .offset-xl-3 { margin-left: 25%; }
  .offset-xl-4 { margin-left: 33.333333%; }
  .offset-xl-5 { margin-left: 41.666667%; }
  .offset-xl-6 { margin-left: 50%; }
  .offset-xl-7 { margin-left: 58.333333%; }
  .offset-xl-8 { margin-left: 66.666667%; }
  .offset-xl-9 { margin-left: 75%; }
  .offset-xl-10 { margin-left: 83.333333%; }
  .offset-xl-11 { margin-left: 91.666667%; }
}

@media (min-width: 1400px) {
  .offset-xxl-0 { margin-left: 0; }
  .offset-xxl-1 { margin-left: 8.333333%; }
  .offset-xxl-2 { margin-left: 16.666667%; }
  .offset-xxl-3 { margin-left: 25%; }
  .offset-xxl-4 { margin-left: 33.333333%; }
  .offset-xxl-5 { margin-left: 41.666667%; }
  .offset-xxl-6 { margin-left: 50%; }
  .offset-xxl-7 { margin-left: 58.333333%; }
  .offset-xxl-8 { margin-left: 66.666667%; }
  .offset-xxl-9 { margin-left: 75%; }
  .offset-xxl-10 { margin-left: 83.333333%; }
  .offset-xxl-11 { margin-left: 91.666667%; }
}

/* ==========================================================================
   ORDER UTILITIES
   ========================================================================== */
.order-first { order: -1; }
.order-0 { order: 0; }
.order-1 { order: 1; }
.order-2 { order: 2; }
.order-3 { order: 3; }
.order-4 { order: 4; }
.order-5 { order: 5; }
.order-last { order: 6; }

@media (min-width: 576px) {
  .order-sm-first { order: -1; }
  .order-sm-0 { order: 0; }
  .order-sm-1 { order: 1; }
  .order-sm-2 { order: 2; }
  .order-sm-3 { order: 3; }
  .order-sm-4 { order: 4; }
  .order-sm-5 { order: 5; }
  .order-sm-last { order: 6; }
}

@media (min-width: 768px) {
  .order-md-first { order: -1; }
  .order-md-0 { order: 0; }
  .order-md-1 { order: 1; }
  .order-md-2 { order: 2; }
  .order-md-3 { order: 3; }
  .order-md-4 { order: 4; }
  .order-md-5 { order: 5; }
  .order-md-last { order: 6; }
}

@media (min-width: 992px) {
  .order-lg-first { order: -1; }
  .order-lg-0 { order: 0; }
  .order-lg-1 { order: 1; }
  .order-lg-2 { order: 2; }
  .order-lg-3 { order: 3; }
  .order-lg-4 { order: 4; }
  .order-lg-5 { order: 5; }
  .order-lg-last { order: 6; }
}

@media (min-width: 1200px) {
  .order-xl-first { order: -1; }
  .order-xl-0 { order: 0; }
  .order-xl-1 { order: 1; }
  .order-xl-2 { order: 2; }
  .order-xl-3 { order: 3; }
  .order-xl-4 { order: 4; }
  .order-xl-5 { order: 5; }
  .order-xl-last { order: 6; }
}

@media (min-width: 1400px) {
  .order-xxl-first { order: -1; }
  .order-xxl-0 { order: 0; }
  .order-xxl-1 { order: 1; }
  .order-xxl-2 { order: 2; }
  .order-xxl-3 { order: 3; }
  .order-xxl-4 { order: 4; }
  .order-xxl-5 { order: 5; }
  .order-xxl-last { order: 6; }
}
/**
 * ScholarCSS Buttons
 * Teenage Engineering inspired - functional, precise, orange accents
 */

/* ==========================================================================
   BASE BUTTON
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--scholar-space-2);
  padding: var(--scholar-space-2) var(--scholar-space-4);
  font-family: var(--scholar-font-primary);
  font-size: var(--scholar-text-base);
  font-weight: var(--scholar-font-medium);
  line-height: var(--scholar-leading-tight);
  color: var(--scholar-ink);
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  vertical-align: middle;
  cursor: pointer;
  user-select: none;
  background-color: transparent;
  border: 1px solid transparent;
  border-radius: 0; /* Sharp corners for TE aesthetic */
  transition: all var(--scholar-transition-fast);
}

.btn:focus-visible {
  outline: 2px solid var(--scholar-orange);
  outline-offset: 2px;
}

.btn:disabled,
.btn.disabled,
fieldset:disabled .btn {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

/* ==========================================================================
   BUTTON VARIANTS
   ========================================================================== */

/* Primary - Orange filled */
.btn-primary {
  color: var(--scholar-white);
  background-color: var(--scholar-orange);
  border-color: var(--scholar-orange);
}

.btn-primary:hover {
  color: var(--scholar-white);
  background-color: var(--scholar-coral);
  border-color: var(--scholar-coral);
}

.btn-primary:active,
.btn-primary.active {
  color: var(--scholar-white);
  background-color: var(--scholar-ember);
  border-color: var(--scholar-ember);
}

/* Secondary - Gray filled */
.btn-secondary {
  color: var(--scholar-ink);
  background-color: var(--scholar-steam);
  border-color: var(--scholar-steam);
}

.btn-secondary:hover {
  color: var(--scholar-ink);
  background-color: var(--scholar-fog);
  border-color: var(--scholar-fog);
}

.btn-secondary:active,
.btn-secondary.active {
  color: var(--scholar-ink);
  background-color: var(--scholar-slate);
  border-color: var(--scholar-slate);
}

/* Accent - Tangerine */
.btn-accent {
  color: var(--scholar-void);
  background-color: var(--scholar-tangerine);
  border-color: var(--scholar-tangerine);
}

.btn-accent:hover {
  color: var(--scholar-void);
  background-color: #ffbb33;
  border-color: #ffbb33;
}

.btn-accent:active,
.btn-accent.active {
  color: var(--scholar-void);
  background-color: #e69900;
  border-color: #e69900;
}

/* ==========================================================================
   OUTLINE BUTTONS
   ========================================================================== */

/* Outline Primary */
.btn-outline-primary {
  color: var(--scholar-orange);
  background-color: transparent;
  border-color: var(--scholar-orange);
}

.btn-outline-primary:hover {
  color: var(--scholar-white);
  background-color: var(--scholar-orange);
  border-color: var(--scholar-orange);
}

.btn-outline-primary:active,
.btn-outline-primary.active {
  color: var(--scholar-white);
  background-color: var(--scholar-ember);
  border-color: var(--scholar-ember);
}

/* Outline Secondary */
.btn-outline-secondary {
  color: var(--scholar-slate);
  background-color: transparent;
  border-color: var(--scholar-steam);
}

.btn-outline-secondary:hover {
  color: var(--scholar-ink);
  background-color: var(--scholar-snow);
  border-color: var(--scholar-fog);
}

.btn-outline-secondary:active,
.btn-outline-secondary.active {
  color: var(--scholar-ink);
  background-color: var(--scholar-steam);
  border-color: var(--scholar-fog);
}

/* Outline Light */
.btn-outline-light {
  color: var(--scholar-white);
  background-color: transparent;
  border-color: var(--scholar-white);
}

.btn-outline-light:hover {
  color: var(--scholar-ink);
  background-color: var(--scholar-white);
  border-color: var(--scholar-white);
}

/* Outline Dark */
.btn-outline-dark {
  color: var(--scholar-void);
  background-color: transparent;
  border-color: var(--scholar-void);
}

.btn-outline-dark:hover {
  color: var(--scholar-white);
  background-color: var(--scholar-void);
  border-color: var(--scholar-void);
}

/* ==========================================================================
   GHOST BUTTON
   ========================================================================== */
.btn-ghost {
  color: var(--scholar-slate);
  background-color: transparent;
  border-color: transparent;
}

.btn-ghost:hover {
  color: var(--scholar-ink);
  background-color: var(--scholar-snow);
}

.btn-ghost:active,
.btn-ghost.active {
  color: var(--scholar-ink);
  background-color: var(--scholar-steam);
}

/* Ghost Primary - Orange tint on hover */
.btn-ghost-primary {
  color: var(--scholar-orange);
  background-color: transparent;
  border-color: transparent;
}

.btn-ghost-primary:hover {
  color: var(--scholar-ember);
  background-color: var(--scholar-cream);
}

.btn-ghost-primary:active,
.btn-ghost-primary.active {
  color: var(--scholar-white);
  background-color: var(--scholar-orange);
}

/* ==========================================================================
   LINK BUTTON
   ========================================================================== */
.btn-link {
  font-weight: var(--scholar-font-normal);
  color: var(--scholar-orange);
  text-decoration: none;
  background-color: transparent;
  border-color: transparent;
  padding-left: var(--scholar-space-2);
  padding-right: var(--scholar-space-2);
}

.btn-link:hover {
  color: var(--scholar-ember);
  text-decoration: underline;
  background-color: transparent;
  border-color: transparent;
}

.btn-link:focus-visible {
  text-decoration: underline;
}

.btn-link:disabled,
.btn-link.disabled {
  color: var(--scholar-slate);
  text-decoration: none;
}

/* ==========================================================================
   BUTTON SIZES
   ========================================================================== */
.btn-lg {
  padding: var(--scholar-space-3) var(--scholar-space-6);
  font-size: var(--scholar-text-lg);
}

.btn-sm {
  padding: var(--scholar-space-1) var(--scholar-space-3);
  font-size: var(--scholar-text-sm);
}

.btn-xs {
  padding: var(--scholar-space-0-5) var(--scholar-space-2);
  font-size: var(--scholar-text-xs);
}

/* ==========================================================================
   BLOCK BUTTON
   ========================================================================== */
.btn-block {
  display: flex;
  width: 100%;
}

/* ==========================================================================
   ICON BUTTON
   ========================================================================== */
.btn-icon {
  padding: var(--scholar-space-2);
  line-height: 1;
}

.btn-icon.btn-sm {
  padding: var(--scholar-space-1-5);
}

.btn-icon.btn-lg {
  padding: var(--scholar-space-3);
}

.btn-icon svg,
.btn-icon img {
  width: 1.25em;
  height: 1.25em;
}

/* ==========================================================================
   BUTTON GROUPS
   ========================================================================== */
.btn-group,
.btn-group-vertical {
  position: relative;
  display: inline-flex;
  vertical-align: middle;
}

.btn-group > .btn,
.btn-group-vertical > .btn {
  position: relative;
  flex: 1 1 auto;
}

.btn-group > .btn:hover,
.btn-group-vertical > .btn:hover {
  z-index: 1;
}

.btn-group > .btn:focus,
.btn-group > .btn:active,
.btn-group > .btn.active,
.btn-group-vertical > .btn:focus,
.btn-group-vertical > .btn:active,
.btn-group-vertical > .btn.active {
  z-index: 2;
}

/* Horizontal group */
.btn-group > .btn:not(:first-child),
.btn-group > .btn-group:not(:first-child) {
  margin-left: -1px;
}

.btn-group > .btn:not(:last-child):not(.dropdown-toggle),
.btn-group > .btn-group:not(:last-child) > .btn {
  border-right-color: transparent;
}

/* Vertical group */
.btn-group-vertical {
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.btn-group-vertical > .btn,
.btn-group-vertical > .btn-group {
  width: 100%;
}

.btn-group-vertical > .btn:not(:first-child),
.btn-group-vertical > .btn-group:not(:first-child) {
  margin-top: -1px;
}

.btn-group-vertical > .btn:not(:last-child):not(.dropdown-toggle),
.btn-group-vertical > .btn-group:not(:last-child) > .btn {
  border-bottom-color: transparent;
}

/* ==========================================================================
   LOADING STATE
   ========================================================================== */
.btn-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

.btn-loading::after {
  content: '';
  position: absolute;
  width: 1em;
  height: 1em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: btn-spin 0.75s linear infinite;
}

@keyframes btn-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   CLOSE BUTTON (for modals, alerts, etc.)
   ========================================================================== */
.btn-close {
  padding: var(--scholar-space-2);
  color: var(--scholar-slate);
  background: transparent;
  border: 0;
  border-radius: var(--scholar-radius-sm);
  opacity: 0.6;
  transition: opacity var(--scholar-transition-fast);
}

.btn-close:hover {
  color: var(--scholar-ink);
  opacity: 1;
  text-decoration: none;
}

.btn-close:focus-visible {
  outline: 2px solid var(--scholar-orange);
  outline-offset: 2px;
  opacity: 1;
}

.btn-close:disabled,
.btn-close.disabled {
  opacity: 0.25;
}
/**
 * ScholarCSS Cards
 * Academic paper-inspired containers with TE minimalism
 */

/* ==========================================================================
   BASE CARD
   ========================================================================== */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background-color: var(--scholar-white);
  border: 1px solid var(--scholar-steam);
  border-radius: 0; /* Sharp corners for TE aesthetic */
  word-wrap: break-word;
}

.card > hr {
  margin-right: 0;
  margin-left: 0;
}

.card > .list-group {
  border-top: inherit;
  border-bottom: inherit;
}

.card > .list-group:first-child {
  border-top-width: 0;
}

.card > .list-group:last-child {
  border-bottom-width: 0;
}

/* ==========================================================================
   CARD BODY
   ========================================================================== */
.card-body {
  flex: 1 1 auto;
  padding: var(--scholar-space-5);
}

/* ==========================================================================
   CARD HEADER
   ========================================================================== */
.card-header {
  padding: var(--scholar-space-4) var(--scholar-space-5);
  margin-bottom: 0;
  background-color: var(--scholar-snow);
  border-bottom: 1px solid var(--scholar-steam);
}

.card-header:first-child {
  border-radius: 0;
}

/* Header with tabs */
.card-header-tabs {
  margin-right: calc(var(--scholar-space-5) * -1);
  margin-bottom: calc(var(--scholar-space-4) * -1);
  margin-left: calc(var(--scholar-space-5) * -1);
  border-bottom: 0;
}

.card-header-tabs .nav-link.active {
  background-color: var(--scholar-white);
  border-bottom-color: var(--scholar-white);
}

/* ==========================================================================
   CARD FOOTER
   ========================================================================== */
.card-footer {
  padding: var(--scholar-space-4) var(--scholar-space-5);
  background-color: var(--scholar-snow);
  border-top: 1px solid var(--scholar-steam);
}

.card-footer:last-child {
  border-radius: 0;
}

/* ==========================================================================
   CARD TITLES
   ========================================================================== */
.card-title {
  margin-bottom: var(--scholar-space-3);
  font-size: var(--scholar-text-xl);
  font-weight: var(--scholar-font-semibold);
  color: var(--scholar-ink);
}

.card-subtitle {
  margin-top: calc(var(--scholar-space-2) * -1);
  margin-bottom: 0;
  font-size: var(--scholar-text-sm);
  color: var(--scholar-slate);
}

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

.card-link {
  color: var(--scholar-orange);
  text-decoration: none;
}

.card-link:hover {
  color: var(--scholar-ember);
  text-decoration: underline;
}

.card-link + .card-link {
  margin-left: var(--scholar-space-4);
}

/* ==========================================================================
   CARD IMAGES
   ========================================================================== */
.card-img,
.card-img-top,
.card-img-bottom {
  width: 100%;
}

.card-img,
.card-img-top {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.card-img,
.card-img-bottom {
  border-bottom-right-radius: 0;
  border-bottom-left-radius: 0;
}

/* Image overlay */
.card-img-overlay {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  padding: var(--scholar-space-5);
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 100%);
  color: var(--scholar-white);
}

/* ==========================================================================
   CARD VARIANTS
   ========================================================================== */

/* Outline card - transparent background */
.card-outline {
  background-color: transparent;
}

/* Ghost card - subtle background, no border */
.card-ghost {
  background-color: var(--scholar-snow);
  border-color: transparent;
}

/* Accent card - left border in orange */
.card-accent {
  border-left: 3px solid var(--scholar-orange);
}

/* Interactive card - hover lift effect */
.card-interactive {
  transition: transform var(--scholar-transition-base), 
              box-shadow var(--scholar-transition-base);
  cursor: pointer;
}

.card-interactive:hover {
  transform: translateY(-2px);
  box-shadow: var(--scholar-shadow-lg);
}

.card-interactive:active {
  transform: translateY(0);
  box-shadow: var(--scholar-shadow);
}

/* ==========================================================================
   CARD SIZES
   ========================================================================== */
.card-sm .card-body {
  padding: var(--scholar-space-4);
}

.card-sm .card-header,
.card-sm .card-footer {
  padding: var(--scholar-space-3) var(--scholar-space-4);
}

.card-lg .card-body {
  padding: var(--scholar-space-8);
}

.card-lg .card-header,
.card-lg .card-footer {
  padding: var(--scholar-space-5) var(--scholar-space-8);
}

/* ==========================================================================
   ACADEMIC PAPER STYLE
   ========================================================================== */
.paper {
  background-color: var(--scholar-white);
  border: 1px solid var(--scholar-steam);
  padding: var(--scholar-space-10);
  max-width: 800px;
  margin: 0 auto;
}

.paper-header {
  text-align: center;
  margin-bottom: var(--scholar-space-8);
  padding-bottom: var(--scholar-space-6);
  border-bottom: 1px solid var(--scholar-steam);
}

.paper-title {
  font-size: var(--scholar-text-3xl);
  font-weight: var(--scholar-font-bold);
  color: var(--scholar-ink);
  margin-bottom: var(--scholar-space-4);
}

.paper-authors {
  color: var(--scholar-slate);
  font-size: var(--scholar-text-lg);
}

.paper-abstract {
  background-color: var(--scholar-snow);
  padding: var(--scholar-space-5);
  margin-bottom: var(--scholar-space-8);
  border-left: 3px solid var(--scholar-orange);
}

.paper-abstract h3 {
  font-size: var(--scholar-text-lg);
  font-weight: var(--scholar-font-semibold);
  margin-bottom: var(--scholar-space-3);
  text-transform: uppercase;
  letter-spacing: var(--scholar-tracking-wide);
}

/* Citation card for references */
.citation-card {
  padding: var(--scholar-space-4);
  margin-bottom: var(--scholar-space-3);
  background-color: var(--scholar-snow);
  border-left: 2px solid var(--scholar-steam);
  padding-left: var(--scholar-space-5);
  text-indent: -0.5em;
  hanging-punctuation: first;
}

.citation-card:hover {
  border-left-color: var(--scholar-orange);
  background-color: var(--scholar-cream);
}

/* ==========================================================================
   HORIZONTAL CARD
   ========================================================================== */
.card-horizontal {
  flex-direction: row;
}

.card-horizontal .card-img,
.card-horizontal .card-img-top,
.card-horizontal .card-img-bottom {
  width: 200px;
  object-fit: cover;
}

@media (max-width: 767.98px) {
  .card-horizontal {
    flex-direction: column;
  }
  
  .card-horizontal .card-img,
  .card-horizontal .card-img-top,
  .card-horizontal .card-img-bottom {
    width: 100%;
    height: 200px;
  }
}

/* ==========================================================================
   CARD GROUP
   ========================================================================== */
.card-group {
  display: flex;
  flex-direction: column;
}

.card-group > .card {
  margin-bottom: var(--scholar-space-4);
}

@media (min-width: 576px) {
  .card-group {
    flex-flow: row wrap;
  }
  
  .card-group > .card {
    flex: 1 0 0%;
    margin-bottom: 0;
  }
  
  .card-group > .card + .card {
    margin-left: 0;
    border-left: 0;
  }
  
  .card-group > .card:not(:last-child) {
    border-right: 0;
  }
}

/* ==========================================================================
   CARD DECK
   ========================================================================== */
.card-deck {
  display: flex;
  flex-direction: column;
  gap: var(--scholar-space-4);
}

.card-deck .card {
  margin-bottom: var(--scholar-space-4);
}

@media (min-width: 576px) {
  .card-deck {
    flex-flow: row wrap;
    margin-right: calc(var(--scholar-space-4) * -1);
    margin-left: calc(var(--scholar-space-4) * -1);
  }
  
  .card-deck .card {
    display: flex;
    flex: 1 0 0%;
    flex-direction: column;
    margin-right: var(--scholar-space-4);
    margin-bottom: 0;
    margin-left: var(--scholar-space-4);
  }
}

/* ==========================================================================
   CARD COLUMNS (Masonry-like)
   ========================================================================== */
.card-columns {
  column-count: 1;
  column-gap: var(--scholar-space-4);
}

.card-columns .card {
  margin-bottom: var(--scholar-space-4);
  break-inside: avoid;
}

@media (min-width: 576px) {
  .card-columns {
    column-count: 2;
  }
}

@media (min-width: 992px) {
  .card-columns {
    column-count: 3;
  }
}
/**
 * ScholarCSS Forms
 * Clean, academic form styling with orange focus accents
 */

/* ==========================================================================
   FORM GROUP
   ========================================================================== */
.form-group {
  margin-bottom: var(--scholar-space-5);
}

.form-group:last-child {
  margin-bottom: 0;
}

/* ==========================================================================
   FORM LABEL
   ========================================================================== */
.form-label {
  display: inline-block;
  margin-bottom: var(--scholar-space-2);
  font-size: var(--scholar-text-sm);
  font-weight: var(--scholar-font-medium);
  color: var(--scholar-ink);
}

.form-label.required::after {
  content: ' *';
  color: var(--scholar-error);
}

.col-form-label {
  padding-top: calc(var(--scholar-space-2) + 1px);
  padding-bottom: calc(var(--scholar-space-2) + 1px);
  margin-bottom: 0;
  font-size: inherit;
  font-weight: var(--scholar-font-medium);
  line-height: var(--scholar-leading-tight);
  color: var(--scholar-ink);
}

.col-form-label-lg {
  padding-top: calc(var(--scholar-space-3) + 1px);
  padding-bottom: calc(var(--scholar-space-3) + 1px);
  font-size: var(--scholar-text-lg);
}

.col-form-label-sm {
  padding-top: calc(var(--scholar-space-1) + 1px);
  padding-bottom: calc(var(--scholar-space-1) + 1px);
  font-size: var(--scholar-text-sm);
}

/* ==========================================================================
   FORM CONTROL
   ========================================================================== */
.form-control {
  display: block;
  width: 100%;
  padding: var(--scholar-space-2) var(--scholar-space-3);
  font-family: var(--scholar-font-primary);
  font-size: var(--scholar-text-base);
  font-weight: var(--scholar-font-normal);
  line-height: var(--scholar-leading-tight);
  color: var(--scholar-graphite);
  background-color: var(--scholar-white);
  background-clip: padding-box;
  border: 1px solid var(--scholar-steam);
  border-radius: 0;
  appearance: none;
  transition: border-color var(--scholar-transition-fast), 
              box-shadow var(--scholar-transition-fast);
}

.form-control:focus {
  color: var(--scholar-graphite);
  background-color: var(--scholar-white);
  border-color: var(--scholar-orange);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.15);
}

.form-control::placeholder {
  color: var(--scholar-slate);
  opacity: 1;
}

.form-control:disabled,
.form-control[readonly] {
  background-color: var(--scholar-snow);
  opacity: 1;
  cursor: not-allowed;
}

.form-control:disabled {
  cursor: not-allowed;
}

/* File input */
.form-control[type="file"] {
  overflow: hidden;
}

.form-control[type="file"]:not(:disabled):not([readonly]) {
  cursor: pointer;
}

/* ==========================================================================
   FORM CONTROL SIZES
   ========================================================================== */
.form-control-lg {
  padding: var(--scholar-space-3) var(--scholar-space-4);
  font-size: var(--scholar-text-lg);
}

.form-control-sm {
  padding: var(--scholar-space-1) var(--scholar-space-2);
  font-size: var(--scholar-text-sm);
}

/* ==========================================================================
   FORM TEXT (HELP TEXT)
   ========================================================================== */
.form-text {
  display: block;
  margin-top: var(--scholar-space-1);
  font-size: var(--scholar-text-sm);
  color: var(--scholar-slate);
}

/* ==========================================================================
   FORM SELECT
   ========================================================================== */
.form-select {
  display: block;
  width: 100%;
  padding: var(--scholar-space-2) calc(var(--scholar-space-3) + 1.5rem) var(--scholar-space-2) var(--scholar-space-3);
  font-family: var(--scholar-font-primary);
  font-size: var(--scholar-text-base);
  font-weight: var(--scholar-font-normal);
  line-height: var(--scholar-leading-tight);
  color: var(--scholar-graphite);
  background-color: var(--scholar-white);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right var(--scholar-space-3) center;
  background-size: 16px 12px;
  border: 1px solid var(--scholar-steam);
  border-radius: 0;
  appearance: none;
  transition: border-color var(--scholar-transition-fast), 
              box-shadow var(--scholar-transition-fast);
}

.form-select:focus {
  border-color: var(--scholar-orange);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.15);
}

.form-select[multiple],
.form-select[size]:not([size="1"]) {
  padding-right: var(--scholar-space-3);
  background-image: none;
}

.form-select:disabled {
  background-color: var(--scholar-snow);
  cursor: not-allowed;
}

.form-select:-moz-focusring {
  color: transparent;
  text-shadow: 0 0 0 var(--scholar-graphite);
}

.form-select-sm {
  padding-top: var(--scholar-space-1);
  padding-bottom: var(--scholar-space-1);
  padding-left: var(--scholar-space-2);
  font-size: var(--scholar-text-sm);
}

.form-select-lg {
  padding-top: var(--scholar-space-3);
  padding-bottom: var(--scholar-space-3);
  padding-left: var(--scholar-space-4);
  font-size: var(--scholar-text-lg);
}

/* ==========================================================================
   CHECKBOXES & RADIOS
   ========================================================================== */
.form-check {
  display: block;
  min-height: 1.5rem;
  padding-left: 1.75em;
  margin-bottom: var(--scholar-space-2);
}

.form-check .form-check-input {
  float: left;
  margin-left: -1.75em;
}

.form-check-input {
  width: 1.125em;
  height: 1.125em;
  margin-top: 0.1875em;
  vertical-align: top;
  background-color: var(--scholar-white);
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  border: 1px solid var(--scholar-fog);
  appearance: none;
  print-color-adjust: exact;
  transition: background-color var(--scholar-transition-fast), 
              background-position var(--scholar-transition-fast), 
              border-color var(--scholar-transition-fast), 
              box-shadow var(--scholar-transition-fast);
}

.form-check-input[type="checkbox"] {
  border-radius: var(--scholar-radius-sm);
}

.form-check-input[type="radio"] {
  border-radius: 50%;
}

.form-check-input:active {
  filter: brightness(90%);
}

.form-check-input:focus {
  border-color: var(--scholar-orange);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.15);
}

.form-check-input:checked {
  background-color: var(--scholar-orange);
  border-color: var(--scholar-orange);
}

.form-check-input:checked[type="checkbox"] {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");
}

.form-check-input:checked[type="radio"] {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%23fff'/%3e%3c/svg%3e");
}

.form-check-input[type="checkbox"]:indeterminate {
  background-color: var(--scholar-orange);
  border-color: var(--scholar-orange);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10h8'/%3e%3c/svg%3e");
}

.form-check-input:disabled {
  pointer-events: none;
  filter: none;
  opacity: 0.5;
}

.form-check-input[disabled] ~ .form-check-label,
.form-check-input:disabled ~ .form-check-label {
  cursor: default;
  opacity: 0.5;
}

.form-check-label {
  color: var(--scholar-graphite);
  cursor: pointer;
}

/* Inline checkboxes/radios */
.form-check-inline {
  display: inline-block;
  margin-right: var(--scholar-space-4);
}

/* ==========================================================================
   FORM SWITCH
   ========================================================================== */
.form-switch {
  padding-left: 2.5em;
}

.form-switch .form-check-input {
  width: 2em;
  margin-left: -2.5em;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba%280, 0, 0, 0.25%29'/%3e%3c/svg%3e");
  background-position: left center;
  border-radius: 2em;
  transition: background-position var(--scholar-transition-fast);
}

.form-switch .form-check-input:focus {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23ff6b35'/%3e%3c/svg%3e");
}

.form-switch .form-check-input:checked {
  background-position: right center;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e");
}

/* ==========================================================================
   FORM RANGE
   ========================================================================== */
.form-range {
  width: 100%;
  height: 1.5rem;
  padding: 0;
  background-color: transparent;
  appearance: none;
}

.form-range:focus {
  outline: 0;
}

.form-range:focus::-webkit-slider-thumb {
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.15);
}

.form-range:focus::-moz-range-thumb {
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.15);
}

.form-range::-moz-focus-outer {
  border: 0;
}

.form-range::-webkit-slider-thumb {
  width: 1rem;
  height: 1rem;
  margin-top: -0.375rem;
  background-color: var(--scholar-orange);
  border: 0;
  border-radius: 1rem;
  appearance: none;
  transition: background-color var(--scholar-transition-fast), 
              box-shadow var(--scholar-transition-fast);
}

.form-range::-webkit-slider-thumb:active {
  background-color: var(--scholar-ember);
}

.form-range::-webkit-slider-runnable-track {
  width: 100%;
  height: 0.25rem;
  color: transparent;
  cursor: pointer;
  background-color: var(--scholar-steam);
  border-color: transparent;
  border-radius: 1rem;
}

.form-range::-moz-range-thumb {
  width: 1rem;
  height: 1rem;
  background-color: var(--scholar-orange);
  border: 0;
  border-radius: 1rem;
  appearance: none;
  transition: background-color var(--scholar-transition-fast), 
              box-shadow var(--scholar-transition-fast);
}

.form-range::-moz-range-thumb:active {
  background-color: var(--scholar-ember);
}

.form-range::-moz-range-track {
  width: 100%;
  height: 0.25rem;
  color: transparent;
  cursor: pointer;
  background-color: var(--scholar-steam);
  border-color: transparent;
  border-radius: 1rem;
}

.form-range:disabled {
  pointer-events: none;
}

.form-range:disabled::-webkit-slider-thumb {
  background-color: var(--scholar-fog);
}

.form-range:disabled::-moz-range-thumb {
  background-color: var(--scholar-fog);
}

/* ==========================================================================
   INPUT GROUP
   ========================================================================== */
.input-group {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  width: 100%;
}

.input-group > .form-control,
.input-group > .form-select {
  position: relative;
  flex: 1 1 auto;
  width: 1%;
  min-width: 0;
}

.input-group > .form-control:focus,
.input-group > .form-select:focus {
  z-index: 3;
}

.input-group .btn {
  position: relative;
  z-index: 2;
}

.input-group .btn:focus {
  z-index: 3;
}

.input-group-text {
  display: flex;
  align-items: center;
  padding: var(--scholar-space-2) var(--scholar-space-3);
  font-size: var(--scholar-text-base);
  font-weight: var(--scholar-font-normal);
  line-height: var(--scholar-leading-tight);
  color: var(--scholar-slate);
  text-align: center;
  white-space: nowrap;
  background-color: var(--scholar-snow);
  border: 1px solid var(--scholar-steam);
  border-radius: 0;
}

.input-group:not(.has-validation) > :not(:last-child):not(.dropdown-toggle):not(.dropdown-menu),
.input-group:not(.has-validation) > .dropdown-toggle:nth-last-child(n+3) {
  border-right: 0;
}

.input-group > :not(:first-child):not(.dropdown-menu):not(.valid-tooltip):not(.valid-feedback):not(.invalid-tooltip):not(.invalid-feedback) {
  margin-left: -1px;
  border-left: 0;
}

/* Input group sizing */
.input-group-lg > .form-control,
.input-group-lg > .form-select,
.input-group-lg > .input-group-text,
.input-group-lg > .btn {
  padding: var(--scholar-space-3) var(--scholar-space-4);
  font-size: var(--scholar-text-lg);
}

.input-group-sm > .form-control,
.input-group-sm > .form-select,
.input-group-sm > .input-group-text,
.input-group-sm > .btn {
  padding: var(--scholar-space-1) var(--scholar-space-2);
  font-size: var(--scholar-text-sm);
}

/* ==========================================================================
   VALIDATION STATES
   ========================================================================== */
.form-control.is-valid,
.was-validated .form-control:valid {
  border-color: var(--scholar-success);
  padding-right: calc(1.5em + 0.75rem);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2310b981' d='M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right calc(0.375em + 0.1875rem) center;
  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.form-control.is-valid:focus,
.was-validated .form-control:valid:focus {
  border-color: var(--scholar-success);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.form-control.is-invalid,
.was-validated .form-control:invalid {
  border-color: var(--scholar-error);
  padding-right: calc(1.5em + 0.75rem);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23ef4444'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23ef4444' stroke='none'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right calc(0.375em + 0.1875rem) center;
  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.form-control.is-invalid:focus,
.was-validated .form-control:invalid:focus {
  border-color: var(--scholar-error);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.valid-feedback {
  display: none;
  width: 100%;
  margin-top: var(--scholar-space-1);
  font-size: var(--scholar-text-sm);
  color: var(--scholar-success);
}

.invalid-feedback {
  display: none;
  width: 100%;
  margin-top: var(--scholar-space-1);
  font-size: var(--scholar-text-sm);
  color: var(--scholar-error);
}

.is-valid ~ .valid-feedback,
.is-valid ~ .valid-tooltip,
.was-validated :valid ~ .valid-feedback,
.was-validated :valid ~ .valid-tooltip {
  display: block;
}

.is-invalid ~ .invalid-feedback,
.is-invalid ~ .invalid-tooltip,
.was-validated :invalid ~ .invalid-feedback,
.was-validated :invalid ~ .invalid-tooltip {
  display: block;
}

/* ==========================================================================
   FLOATING LABELS
   ========================================================================== */
.form-floating {
  position: relative;
}

.form-floating > .form-control,
.form-floating > .form-select {
  height: calc(3.5rem + 2px);
  line-height: 1.25;
}

.form-floating > label {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 1rem 0.75rem;
  overflow: hidden;
  text-align: start;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
  border: 1px solid transparent;
  transform-origin: 0 0;
  transition: opacity var(--scholar-transition-fast) ease-in-out, 
              transform var(--scholar-transition-fast) ease-in-out;
}

.form-floating > .form-control::placeholder {
  color: transparent;
}

.form-floating > .form-control:focus,
.form-floating > .form-control:not(:placeholder-shown) {
  padding-top: 1.625rem;
  padding-bottom: 0.625rem;
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label,
.form-floating > .form-select ~ label {
  opacity: 0.65;
  transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
}

.form-floating > .form-control:focus ~ label {
  color: var(--scholar-orange);
}

.form-floating > .form-control:disabled ~ label,
.form-floating > .form-select:disabled ~ label {
  opacity: 0.5;
}
/**
 * ScholarCSS Tables
 * Academic data tables - clean, precise, scientific
 */

/* ==========================================================================
   BASE TABLE
   ========================================================================== */
.table {
  width: 100%;
  margin-bottom: var(--scholar-space-5);
  color: var(--scholar-graphite);
  vertical-align: top;
  border-color: var(--scholar-steam);
  font-size: var(--scholar-text-sm);
}

.table > :not(caption) > * > * {
  padding: var(--scholar-space-3) var(--scholar-space-4);
  background-color: var(--scholar-white);
  border-bottom: 1px solid var(--scholar-steam);
}

.table > tbody {
  vertical-align: inherit;
}

.table > thead {
  vertical-align: bottom;
}

.table > :not(:last-child) > :last-child > * {
  border-bottom-color: var(--scholar-fog);
}

/* Caption */
.table-caption {
  padding-top: var(--scholar-space-3);
  padding-bottom: var(--scholar-space-3);
  color: var(--scholar-slate);
  text-align: left;
  caption-side: top;
  font-size: var(--scholar-text-sm);
  font-weight: var(--scholar-font-medium);
}

/* ==========================================================================
   TABLE VARIANTS
   ========================================================================== */

/* Striped rows */
.table-striped > tbody > tr:nth-of-type(odd) > * {
  background-color: var(--scholar-snow);
}

/* Hover effect */
.table-hover > tbody > tr:hover > * {
  background-color: var(--scholar-cream);
}

/* Bordered table */
.table-bordered > :not(caption) > * {
  border-width: 1px 0;
}

.table-bordered > :not(caption) > * > * {
  border-width: 0 1px;
}

.table-bordered > :not(caption) > * > * {
  border-color: var(--scholar-steam);
}

/* Borderless */
.table-borderless > :not(caption) > * > * {
  border-bottom-width: 0;
}

.table-borderless > :not(:first-child) {
  border-top-width: 0;
}

/* ==========================================================================
   TABLE SIZES
   ========================================================================== */
.table-sm > :not(caption) > * > * {
  padding: var(--scholar-space-2) var(--scholar-space-3);
}

.table-lg > :not(caption) > * > * {
  padding: var(--scholar-space-4) var(--scholar-space-5);
}

/* ==========================================================================
   TABLE THEMES (CONTEXTUAL CLASSES)
   ========================================================================== */
.table-primary {
  --scholar-table-bg: var(--scholar-cream);
  --scholar-table-striped-bg: #ffe8e0;
  --scholar-table-active-bg: #ffdcd1;
  --scholar-table-hover-bg: #ffe2d8;
  color: var(--scholar-ink);
  border-color: #ffd0c2;
}

.table-success {
  --scholar-table-bg: var(--scholar-success-light);
  --scholar-table-striped-bg: #c5f3dc;
  --scholar-table-active-bg: #b3f0d0;
  --scholar-table-hover-bg: #bbf1d5;
  color: #065f46;
  border-color: #a7f3d0;
}

.table-info {
  --scholar-table-bg: var(--scholar-info-light);
  --scholar-table-striped-bg: #c7d9f7;
  --scholar-table-active-bg: #b5cef5;
  --scholar-table-hover-bg: #bdd3f6;
  color: #1e40af;
  border-color: #bfdbfe;
}

.table-warning {
  --scholar-table-bg: var(--scholar-warning-light);
  --scholar-table-striped-bg: #fdecb5;
  --scholar-table-active-bg: #fde7a2;
  --scholar-table-hover-bg: #fde9ab;
  color: #92400e;
  border-color: #fcd34d;
}

.table-error,
.table-danger {
  --scholar-table-bg: var(--scholar-error-light);
  --scholar-table-striped-bg: #fed6d6;
  --scholar-table-active-bg: #fec4c4;
  --scholar-table-hover-bg: #fecaca;
  color: #991b1b;
  border-color: #fca5a5;
}

.table-light {
  --scholar-table-bg: var(--scholar-snow);
  --scholar-table-striped-bg: #ebedf0;
  --scholar-table-active-bg: #e2e4e8;
  --scholar-table-hover-bg: #e6e8ec;
  color: var(--scholar-graphite);
  border-color: var(--scholar-steam);
}

.table-dark {
  --scholar-table-bg: var(--scholar-ink);
  --scholar-table-striped-bg: #2a3441;
  --scholar-table-active-bg: #353f4b;
  --scholar-table-hover-bg: #303a46;
  color: var(--scholar-white);
  border-color: #374151;
}

/* Apply theme colors */
.table-primary > :not(caption) > * > *,
.table-success > :not(caption) > * > *,
.table-info > :not(caption) > * > *,
.table-warning > :not(caption) > * > *,
.table-error > :not(caption) > * > *,
.table-danger > :not(caption) > * > *,
.table-light > :not(caption) > * > *,
.table-dark > :not(caption) > * > * {
  background-color: var(--scholar-table-bg);
}

/* ==========================================================================
   TABLE HEAD THEMES
   ========================================================================== */
.thead-light th {
  color: var(--scholar-graphite);
  background-color: var(--scholar-snow);
  border-color: var(--scholar-steam);
  font-weight: var(--scholar-font-semibold);
  text-transform: uppercase;
  font-size: var(--scholar-text-xs);
  letter-spacing: var(--scholar-tracking-wide);
}

.thead-dark th {
  color: var(--scholar-white);
  background-color: var(--scholar-ink);
  border-color: #374151;
  font-weight: var(--scholar-font-semibold);
  text-transform: uppercase;
  font-size: var(--scholar-text-xs);
  letter-spacing: var(--scholar-tracking-wide);
}

/* ==========================================================================
   RESPONSIVE TABLES
   ========================================================================== */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-responsive > .table {
  margin-bottom: 0;
}

@media (max-width: 575.98px) {
  .table-responsive-sm {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 767.98px) {
  .table-responsive-md {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 991.98px) {
  .table-responsive-lg {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 1199.98px) {
  .table-responsive-xl {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 1399.98px) {
  .table-responsive-xxl {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* ==========================================================================
   ACADEMIC TABLE PATTERNS
   ========================================================================== */

/* Data table - for research data */
.data-table th {
  text-align: left;
  font-weight: var(--scholar-font-semibold);
  color: var(--scholar-ink);
}

.data-table td {
  font-family: var(--scholar-font-mono);
  font-variant-numeric: tabular-nums;
}

/* Number alignment for data columns */
.table .num,
.table .numeric {
  text-align: right;
  font-family: var(--scholar-font-mono);
  font-variant-numeric: tabular-nums;
}

/* Comparison table */
.comparison-table th:first-child,
.comparison-table td:first-child {
  font-weight: var(--scholar-font-medium);
  background-color: var(--scholar-snow);
}

.comparison-table th {
  text-align: center;
}

/* Schedule table */
.schedule-table th {
  text-align: center;
  width: 14.2857%; /* 7 equal columns */
}

.schedule-table td {
  height: 60px;
  vertical-align: top;
}

/* Literature review table */
.lit-review-table th {
  font-size: var(--scholar-text-xs);
  text-transform: uppercase;
  letter-spacing: var(--scholar-tracking-wide);
}

.lit-review-table td:first-child {
  font-weight: var(--scholar-font-medium);
}

.lit-review-table .year {
  font-family: var(--scholar-font-mono);
  color: var(--scholar-slate);
  font-size: var(--scholar-text-sm);
}

/* ==========================================================================
   TABLE UTILITIES
   ========================================================================== */
.table-align-middle > :not(caption) > * > * {
  vertical-align: middle;
}

.table-align-top > :not(caption) > * > * {
  vertical-align: top;
}

.table-align-bottom > :not(caption) > * > * {
  vertical-align: bottom;
}

/* Column dividers */
.table-col-dividers > :not(caption) > * > :not(:first-child) {
  border-left: 1px solid var(--scholar-steam);
}

/* Row group dividers */
.table-row-groups > tbody + tbody {
  border-top: 2px solid var(--scholar-fog);
}

/* Empty cell styling */
.table td:empty::before {
  content: '\2014';
  color: var(--scholar-fog);
}

/* ==========================================================================
   FIGURE & CAPTION (ACADEMIC)
   ========================================================================== */
.figure {
  display: inline-block;
  margin-bottom: var(--scholar-space-5);
}

.figure-img {
  margin-bottom: var(--scholar-space-3);
  line-height: 1;
}

.figure-caption {
  font-size: var(--scholar-text-sm);
  color: var(--scholar-slate);
}

.figure-caption::before {
  content: 'Figure: ';
  font-weight: var(--scholar-font-semibold);
  color: var(--scholar-ink);
}
/**
 * ScholarCSS Utilities
 * Comprehensive utility classes for rapid development
 */

/* ==========================================================================
   SPACING UTILITIES
   ========================================================================== */

/* Margin */
.m-0 { margin: 0 !important; }
.m-1 { margin: var(--scholar-space-1) !important; }
.m-2 { margin: var(--scholar-space-2) !important; }
.m-3 { margin: var(--scholar-space-3) !important; }
.m-4 { margin: var(--scholar-space-4) !important; }
.m-5 { margin: var(--scholar-space-5) !important; }
.m-6 { margin: var(--scholar-space-6) !important; }
.m-8 { margin: var(--scholar-space-8) !important; }
.m-10 { margin: var(--scholar-space-10) !important; }
.m-auto { margin: auto !important; }

.mx-0 { margin-right: 0 !important; margin-left: 0 !important; }
.mx-1 { margin-right: var(--scholar-space-1) !important; margin-left: var(--scholar-space-1) !important; }
.mx-2 { margin-right: var(--scholar-space-2) !important; margin-left: var(--scholar-space-2) !important; }
.mx-3 { margin-right: var(--scholar-space-3) !important; margin-left: var(--scholar-space-3) !important; }
.mx-4 { margin-right: var(--scholar-space-4) !important; margin-left: var(--scholar-space-4) !important; }
.mx-5 { margin-right: var(--scholar-space-5) !important; margin-left: var(--scholar-space-5) !important; }
.mx-auto { margin-right: auto !important; margin-left: auto !important; }

.my-0 { margin-top: 0 !important; margin-bottom: 0 !important; }
.my-1 { margin-top: var(--scholar-space-1) !important; margin-bottom: var(--scholar-space-1) !important; }
.my-2 { margin-top: var(--scholar-space-2) !important; margin-bottom: var(--scholar-space-2) !important; }
.my-3 { margin-top: var(--scholar-space-3) !important; margin-bottom: var(--scholar-space-3) !important; }
.my-4 { margin-top: var(--scholar-space-4) !important; margin-bottom: var(--scholar-space-4) !important; }
.my-5 { margin-top: var(--scholar-space-5) !important; margin-bottom: var(--scholar-space-5) !important; }
.my-6 { margin-top: var(--scholar-space-6) !important; margin-bottom: var(--scholar-space-6) !important; }
.my-8 { margin-top: var(--scholar-space-8) !important; margin-bottom: var(--scholar-space-8) !important; }

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: var(--scholar-space-1) !important; }
.mt-2 { margin-top: var(--scholar-space-2) !important; }
.mt-3 { margin-top: var(--scholar-space-3) !important; }
.mt-4 { margin-top: var(--scholar-space-4) !important; }
.mt-5 { margin-top: var(--scholar-space-5) !important; }
.mt-6 { margin-top: var(--scholar-space-6) !important; }
.mt-8 { margin-top: var(--scholar-space-8) !important; }
.mt-auto { margin-top: auto !important; }

.mr-0 { margin-right: 0 !important; }
.mr-1 { margin-right: var(--scholar-space-1) !important; }
.mr-2 { margin-right: var(--scholar-space-2) !important; }
.mr-3 { margin-right: var(--scholar-space-3) !important; }
.mr-4 { margin-right: var(--scholar-space-4) !important; }
.mr-auto { margin-right: auto !important; }

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: var(--scholar-space-1) !important; }
.mb-2 { margin-bottom: var(--scholar-space-2) !important; }
.mb-3 { margin-bottom: var(--scholar-space-3) !important; }
.mb-4 { margin-bottom: var(--scholar-space-4) !important; }
.mb-5 { margin-bottom: var(--scholar-space-5) !important; }
.mb-6 { margin-bottom: var(--scholar-space-6) !important; }
.mb-8 { margin-bottom: var(--scholar-space-8) !important; }
.mb-auto { margin-bottom: auto !important; }

.ml-0 { margin-left: 0 !important; }
.ml-1 { margin-left: var(--scholar-space-1) !important; }
.ml-2 { margin-left: var(--scholar-space-2) !important; }
.ml-3 { margin-left: var(--scholar-space-3) !important; }
.ml-4 { margin-left: var(--scholar-space-4) !important; }
.ml-auto { margin-left: auto !important; }

/* Padding */
.p-0 { padding: 0 !important; }
.p-1 { padding: var(--scholar-space-1) !important; }
.p-2 { padding: var(--scholar-space-2) !important; }
.p-3 { padding: var(--scholar-space-3) !important; }
.p-4 { padding: var(--scholar-space-4) !important; }
.p-5 { padding: var(--scholar-space-5) !important; }
.p-6 { padding: var(--scholar-space-6) !important; }
.p-8 { padding: var(--scholar-space-8) !important; }
.p-10 { padding: var(--scholar-space-10) !important; }

.px-0 { padding-right: 0 !important; padding-left: 0 !important; }
.px-1 { padding-right: var(--scholar-space-1) !important; padding-left: var(--scholar-space-1) !important; }
.px-2 { padding-right: var(--scholar-space-2) !important; padding-left: var(--scholar-space-2) !important; }
.px-3 { padding-right: var(--scholar-space-3) !important; padding-left: var(--scholar-space-3) !important; }
.px-4 { padding-right: var(--scholar-space-4) !important; padding-left: var(--scholar-space-4) !important; }
.px-5 { padding-right: var(--scholar-space-5) !important; padding-left: var(--scholar-space-5) !important; }
.px-6 { padding-right: var(--scholar-space-6) !important; padding-left: var(--scholar-space-6) !important; }

.py-0 { padding-top: 0 !important; padding-bottom: 0 !important; }
.py-1 { padding-top: var(--scholar-space-1) !important; padding-bottom: var(--scholar-space-1) !important; }
.py-2 { padding-top: var(--scholar-space-2) !important; padding-bottom: var(--scholar-space-2) !important; }
.py-3 { padding-top: var(--scholar-space-3) !important; padding-bottom: var(--scholar-space-3) !important; }
.py-4 { padding-top: var(--scholar-space-4) !important; padding-bottom: var(--scholar-space-4) !important; }
.py-5 { padding-top: var(--scholar-space-5) !important; padding-bottom: var(--scholar-space-5) !important; }
.py-6 { padding-top: var(--scholar-space-6) !important; padding-bottom: var(--scholar-space-6) !important; }
.py-8 { padding-top: var(--scholar-space-8) !important; padding-bottom: var(--scholar-space-8) !important; }
.py-10 { padding-top: var(--scholar-space-10) !important; padding-bottom: var(--scholar-space-10) !important; }

.pt-0 { padding-top: 0 !important; }
.pt-1 { padding-top: var(--scholar-space-1) !important; }
.pt-2 { padding-top: var(--scholar-space-2) !important; }
.pt-3 { padding-top: var(--scholar-space-3) !important; }
.pt-4 { padding-top: var(--scholar-space-4) !important; }
.pt-5 { padding-top: var(--scholar-space-5) !important; }
.pt-6 { padding-top: var(--scholar-space-6) !important; }
.pt-8 { padding-top: var(--scholar-space-8) !important; }

.pr-0 { padding-right: 0 !important; }
.pr-1 { padding-right: var(--scholar-space-1) !important; }
.pr-2 { padding-right: var(--scholar-space-2) !important; }
.pr-3 { padding-right: var(--scholar-space-3) !important; }
.pr-4 { padding-right: var(--scholar-space-4) !important; }
.pr-5 { padding-right: var(--scholar-space-5) !important; }

.pb-0 { padding-bottom: 0 !important; }
.pb-1 { padding-bottom: var(--scholar-space-1) !important; }
.pb-2 { padding-bottom: var(--scholar-space-2) !important; }
.pb-3 { padding-bottom: var(--scholar-space-3) !important; }
.pb-4 { padding-bottom: var(--scholar-space-4) !important; }
.pb-5 { padding-bottom: var(--scholar-space-5) !important; }
.pb-6 { padding-bottom: var(--scholar-space-6) !important; }
.pb-8 { padding-bottom: var(--scholar-space-8) !important; }

.pl-0 { padding-left: 0 !important; }
.pl-1 { padding-left: var(--scholar-space-1) !important; }
.pl-2 { padding-left: var(--scholar-space-2) !important; }
.pl-3 { padding-left: var(--scholar-space-3) !important; }
.pl-4 { padding-left: var(--scholar-space-4) !important; }
.pl-5 { padding-left: var(--scholar-space-5) !important; }

/* Gap */
.gap-0 { gap: 0 !important; }
.gap-1 { gap: var(--scholar-space-1) !important; }
.gap-2 { gap: var(--scholar-space-2) !important; }
.gap-3 { gap: var(--scholar-space-3) !important; }
.gap-4 { gap: var(--scholar-space-4) !important; }
.gap-5 { gap: var(--scholar-space-5) !important; }

/* ==========================================================================
   DISPLAY UTILITIES
   ========================================================================== */
.d-none { display: none !important; }
.d-inline { display: inline !important; }
.d-inline-block { display: inline-block !important; }
.d-block { display: block !important; }
.d-flex { display: flex !important; }
.d-inline-flex { display: inline-flex !important; }
.d-grid { display: grid !important; }
.d-table { display: table !important; }
.d-table-row { display: table-row !important; }
.d-table-cell { display: table-cell !important; }

@media (min-width: 576px) {
  .d-sm-none { display: none !important; }
  .d-sm-inline { display: inline !important; }
  .d-sm-inline-block { display: inline-block !important; }
  .d-sm-block { display: block !important; }
  .d-sm-flex { display: flex !important; }
  .d-sm-inline-flex { display: inline-flex !important; }
  .d-sm-grid { display: grid !important; }
}

@media (min-width: 768px) {
  .d-md-none { display: none !important; }
  .d-md-inline { display: inline !important; }
  .d-md-inline-block { display: inline-block !important; }
  .d-md-block { display: block !important; }
  .d-md-flex { display: flex !important; }
  .d-md-inline-flex { display: inline-flex !important; }
  .d-md-grid { display: grid !important; }
}

@media (min-width: 992px) {
  .d-lg-none { display: none !important; }
  .d-lg-inline { display: inline !important; }
  .d-lg-inline-block { display: inline-block !important; }
  .d-lg-block { display: block !important; }
  .d-lg-flex { display: flex !important; }
  .d-lg-inline-flex { display: inline-flex !important; }
  .d-lg-grid { display: grid !important; }
}

@media (min-width: 1200px) {
  .d-xl-none { display: none !important; }
  .d-xl-inline { display: inline !important; }
  .d-xl-inline-block { display: inline-block !important; }
  .d-xl-block { display: block !important; }
  .d-xl-flex { display: flex !important; }
  .d-xl-inline-flex { display: inline-flex !important; }
  .d-xl-grid { display: grid !important; }
}

/* ==========================================================================
   FLEX UTILITIES
   ========================================================================== */
.flex-row { flex-direction: row !important; }
.flex-column { flex-direction: column !important; }
.flex-row-reverse { flex-direction: row-reverse !important; }
.flex-column-reverse { flex-direction: column-reverse !important; }

.flex-wrap { flex-wrap: wrap !important; }
.flex-nowrap { flex-wrap: nowrap !important; }
.flex-wrap-reverse { flex-wrap: wrap-reverse !important; }

.flex-fill { flex: 1 1 auto !important; }
.flex-grow-0 { flex-grow: 0 !important; }
.flex-grow-1 { flex-grow: 1 !important; }
.flex-shrink-0 { flex-shrink: 0 !important; }
.flex-shrink-1 { flex-shrink: 1 !important; }

.justify-content-start { justify-content: flex-start !important; }
.justify-content-end { justify-content: flex-end !important; }
.justify-content-center { justify-content: center !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-around { justify-content: space-around !important; }
.justify-content-evenly { justify-content: space-evenly !important; }

.align-items-start { align-items: flex-start !important; }
.align-items-end { align-items: flex-end !important; }
.align-items-center { align-items: center !important; }
.align-items-baseline { align-items: baseline !important; }
.align-items-stretch { align-items: stretch !important; }

.align-content-start { align-content: flex-start !important; }
.align-content-end { align-content: flex-end !important; }
.align-content-center { align-content: center !important; }
.align-content-between { align-content: space-between !important; }
.align-content-around { align-content: space-around !important; }
.align-content-stretch { align-content: stretch !important; }

.align-self-auto { align-self: auto !important; }
.align-self-start { align-self: flex-start !important; }
.align-self-end { align-self: flex-end !important; }
.align-self-center { align-self: center !important; }
.align-self-baseline { align-self: baseline !important; }
.align-self-stretch { align-self: stretch !important; }

/* ==========================================================================
   POSITION UTILITIES
   ========================================================================== */
.position-static { position: static !important; }
.position-relative { position: relative !important; }
.position-absolute { position: absolute !important; }
.position-fixed { position: fixed !important; }
.position-sticky { position: sticky !important; }

.top-0 { top: 0 !important; }
.top-50 { top: 50% !important; }
.top-100 { top: 100% !important; }

.bottom-0 { bottom: 0 !important; }
.bottom-50 { bottom: 50% !important; }
.bottom-100 { bottom: 100% !important; }

.start-0 { left: 0 !important; }
.start-50 { left: 50% !important; }
.start-100 { left: 100% !important; }

.end-0 { right: 0 !important; }
.end-50 { right: 50% !important; }
.end-100 { right: 100% !important; }

.translate-middle { transform: translate(-50%, -50%) !important; }
.translate-middle-x { transform: translateX(-50%) !important; }
.translate-middle-y { transform: translateY(-50%) !important; }

/* ==========================================================================
   SIZING UTILITIES
   ========================================================================== */
.w-25 { width: 25% !important; }
.w-50 { width: 50% !important; }
.w-75 { width: 75% !important; }
.w-100 { width: 100% !important; }
.w-auto { width: auto !important; }

.h-25 { height: 25% !important; }
.h-50 { height: 50% !important; }
.h-75 { height: 75% !important; }
.h-100 { height: 100% !important; }
.h-auto { height: auto !important; }

.mw-100 { max-width: 100% !important; }
.mh-100 { max-height: 100% !important; }

.min-vw-100 { min-width: 100vw !important; }
.min-vh-100 { min-height: 100vh !important; }

.vw-100 { width: 100vw !important; }
.vh-100 { height: 100vh !important; }

/* ==========================================================================
   COLOR UTILITIES
   ========================================================================== */

/* Text colors */
.text-white { color: var(--scholar-white) !important; }
.text-snow { color: var(--scholar-snow) !important; }
.text-steam { color: var(--scholar-steam) !important; }
.text-fog { color: var(--scholar-fog) !important; }
.text-slate { color: var(--scholar-slate) !important; }
.text-graphite { color: var(--scholar-graphite) !important; }
.text-ink { color: var(--scholar-ink) !important; }
.text-void { color: var(--scholar-void) !important; }

.text-orange { color: var(--scholar-orange) !important; }
.text-coral { color: var(--scholar-coral) !important; }
.text-ember { color: var(--scholar-ember) !important; }
.text-tangerine { color: var(--scholar-tangerine) !important; }

.text-success { color: var(--scholar-success) !important; }
.text-warning { color: var(--scholar-warning) !important; }
.text-error { color: var(--scholar-error) !important; }
.text-danger { color: var(--scholar-error) !important; }
.text-info { color: var(--scholar-info) !important; }

.text-muted { color: var(--scholar-slate) !important; }

/* Background colors */
.bg-white { background-color: var(--scholar-white) !important; }
.bg-snow { background-color: var(--scholar-snow) !important; }
.bg-steam { background-color: var(--scholar-steam) !important; }
.bg-fog { background-color: var(--scholar-fog) !important; }
.bg-slate { background-color: var(--scholar-slate) !important; }
.bg-graphite { background-color: var(--scholar-graphite) !important; }
.bg-ink { background-color: var(--scholar-ink) !important; }
.bg-void { background-color: var(--scholar-void) !important; }

.bg-orange { background-color: var(--scholar-orange) !important; }
.bg-coral { background-color: var(--scholar-coral) !important; }
.bg-cream { background-color: var(--scholar-cream) !important; }

.bg-success { background-color: var(--scholar-success) !important; }
.bg-success-light { background-color: var(--scholar-success-light) !important; }
.bg-warning { background-color: var(--scholar-warning) !important; }
.bg-warning-light { background-color: var(--scholar-warning-light) !important; }
.bg-error { background-color: var(--scholar-error) !important; }
.bg-error-light { background-color: var(--scholar-error-light) !important; }
.bg-info { background-color: var(--scholar-info) !important; }
.bg-info-light { background-color: var(--scholar-info-light) !important; }

.bg-transparent { background-color: transparent !important; }

/* ==========================================================================
   BORDER UTILITIES
   ========================================================================== */
.border { border: 1px solid var(--scholar-steam) !important; }
.border-0 { border: 0 !important; }
.border-top { border-top: 1px solid var(--scholar-steam) !important; }
.border-top-0 { border-top: 0 !important; }
.border-end { border-right: 1px solid var(--scholar-steam) !important; }
.border-end-0 { border-right: 0 !important; }
.border-bottom { border-bottom: 1px solid var(--scholar-steam) !important; }
.border-bottom-0 { border-bottom: 0 !important; }
.border-start { border-left: 1px solid var(--scholar-steam) !important; }
.border-start-0 { border-left: 0 !important; }

.border-white { border-color: var(--scholar-white) !important; }
.border-steam { border-color: var(--scholar-steam) !important; }
.border-fog { border-color: var(--scholar-fog) !important; }
.border-slate { border-color: var(--scholar-slate) !important; }
.border-orange { border-color: var(--scholar-orange) !important; }
.border-coral { border-color: var(--scholar-coral) !important; }

.border-1 { border-width: 1px !important; }
.border-2 { border-width: 2px !important; }
.border-3 { border-width: 3px !important; }
.border-4 { border-width: 4px !important; }
.border-5 { border-width: 5px !important; }

.rounded { border-radius: var(--scholar-radius) !important; }
.rounded-sm { border-radius: var(--scholar-radius-sm) !important; }
.rounded-md { border-radius: var(--scholar-radius-md) !important; }
.rounded-lg { border-radius: var(--scholar-radius-lg) !important; }
.rounded-xl { border-radius: var(--scholar-radius-xl) !important; }
.rounded-full { border-radius: var(--scholar-radius-full) !important; }
.rounded-0 { border-radius: 0 !important; }

.rounded-top { border-top-left-radius: var(--scholar-radius) !important; border-top-right-radius: var(--scholar-radius) !important; }
.rounded-end { border-top-right-radius: var(--scholar-radius) !important; border-bottom-right-radius: var(--scholar-radius) !important; }
.rounded-bottom { border-bottom-right-radius: var(--scholar-radius) !important; border-bottom-left-radius: var(--scholar-radius) !important; }
.rounded-start { border-top-left-radius: var(--scholar-radius) !important; border-bottom-left-radius: var(--scholar-radius) !important; }

/* ==========================================================================
   SHADOW UTILITIES
   ========================================================================== */
.shadow-none { box-shadow: none !important; }
.shadow-sm { box-shadow: var(--scholar-shadow-sm) !important; }
.shadow { box-shadow: var(--scholar-shadow) !important; }
.shadow-md { box-shadow: var(--scholar-shadow-md) !important; }
.shadow-lg { box-shadow: var(--scholar-shadow-lg) !important; }
.shadow-xl { box-shadow: var(--scholar-shadow-xl) !important; }
.shadow-inner { box-shadow: var(--scholar-shadow-inner) !important; }

/* ==========================================================================
   VISIBILITY UTILITIES
   ========================================================================== */
.visible { visibility: visible !important; }
.invisible { visibility: hidden !important; }

.opacity-0 { opacity: 0 !important; }
.opacity-25 { opacity: 0.25 !important; }
.opacity-50 { opacity: 0.5 !important; }
.opacity-75 { opacity: 0.75 !important; }
.opacity-100 { opacity: 1 !important; }

/* ==========================================================================
   OVERFLOW UTILITIES
   ========================================================================== */
.overflow-auto { overflow: auto !important; }
.overflow-hidden { overflow: hidden !important; }
.overflow-visible { overflow: visible !important; }
.overflow-scroll { overflow: scroll !important; }

.overflow-x-auto { overflow-x: auto !important; }
.overflow-x-hidden { overflow-x: hidden !important; }
.overflow-y-auto { overflow-y: auto !important; }
.overflow-y-hidden { overflow-y: hidden !important; }

/* ==========================================================================
   Z-INDEX UTILITIES
   ========================================================================== */
.z-0 { z-index: 0 !important; }
.z-10 { z-index: 10 !important; }
.z-20 { z-index: 20 !important; }
.z-30 { z-index: 30 !important; }
.z-40 { z-index: 40 !important; }
.z-50 { z-index: 50 !important; }
.z-auto { z-index: auto !important; }
/**
 * ScholarCSS Navigation
 * Clean navigation components with orange accents
 */

/* ==========================================================================
   NAV
   ========================================================================== */
.nav {
  display: flex;
  flex-wrap: wrap;
  padding-left: 0;
  margin-bottom: 0;
  list-style: none;
}

.nav-link {
  display: block;
  padding: var(--scholar-space-2) var(--scholar-space-3);
  font-size: var(--scholar-text-base);
  font-weight: var(--scholar-font-medium);
  color: var(--scholar-slate);
  text-decoration: none;
  transition: color var(--scholar-transition-fast), 
              background-color var(--scholar-transition-fast);
}

.nav-link:hover,
.nav-link:focus {
  color: var(--scholar-orange);
  text-decoration: none;
}

.nav-link.disabled {
  color: var(--scholar-fog);
  pointer-events: none;
  cursor: default;
}

/* ==========================================================================
   NAV TABS
   ========================================================================== */
.nav-tabs {
  border-bottom: 1px solid var(--scholar-steam);
}

.nav-tabs .nav-link {
  margin-bottom: -1px;
  background: none;
  border: 1px solid transparent;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.nav-tabs .nav-link:hover,
.nav-tabs .nav-link:focus {
  border-color: var(--scholar-snow) var(--scholar-snow) var(--scholar-steam);
  isolation: isolate;
}

.nav-tabs .nav-link.disabled {
  color: var(--scholar-fog);
  background-color: transparent;
  border-color: transparent;
}

.nav-tabs .nav-link.active,
.nav-tabs .nav-item.show .nav-link {
  color: var(--scholar-orange);
  background-color: var(--scholar-white);
  border-color: var(--scholar-steam) var(--scholar-steam) var(--scholar-white);
}

.nav-tabs .dropdown-menu {
  margin-top: -1px;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

/* ==========================================================================
   NAV PILLS
   ========================================================================== */
.nav-pills .nav-link {
  background: none;
  border: 0;
  border-radius: 0;
}

.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
  color: var(--scholar-white);
  background-color: var(--scholar-orange);
}

/* Underline nav (minimal) */
.nav-underline .nav-link {
  padding: var(--scholar-space-2) 0;
  margin-right: var(--scholar-space-4);
  border-bottom: 2px solid transparent;
}

.nav-underline .nav-link:hover {
  border-bottom-color: var(--scholar-steam);
}

.nav-underline .nav-link.active {
  color: var(--scholar-orange);
  border-bottom-color: var(--scholar-orange);
}

/* ==========================================================================
   NAVBAR
   ========================================================================== */
.navbar {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding: var(--scholar-space-3) var(--scholar-space-4);
}

.navbar > .container,
.navbar > .container-fluid {
  display: flex;
  flex-wrap: inherit;
  align-items: center;
  justify-content: space-between;
}

.navbar-brand {
  padding-top: 0.3125rem;
  padding-bottom: 0.3125rem;
  margin-right: var(--scholar-space-4);
  font-size: var(--scholar-text-xl);
  font-weight: var(--scholar-font-bold);
  color: var(--scholar-ink);
  text-decoration: none;
  white-space: nowrap;
}

.navbar-brand:hover,
.navbar-brand:focus {
  color: var(--scholar-orange);
  text-decoration: none;
}

.navbar-nav {
  display: flex;
  flex-direction: column;
  padding-left: 0;
  margin-bottom: 0;
  list-style: none;
}

.navbar-nav .nav-link {
  padding-right: 0;
  padding-left: 0;
}

.navbar-nav .dropdown-menu {
  position: static;
}

.navbar-text {
  padding-top: var(--scholar-space-2);
  padding-bottom: var(--scholar-space-2);
  color: var(--scholar-slate);
}

.navbar-text a {
  color: var(--scholar-orange);
}

.navbar-text a:hover,
.navbar-text a:focus {
  color: var(--scholar-ember);
}

/* ==========================================================================
   NAVBAR COLLAPSE
   ========================================================================== */
.navbar-collapse {
  flex-basis: 100%;
  flex-grow: 1;
  align-items: center;
}

.navbar-toggler {
  padding: var(--scholar-space-2);
  font-size: var(--scholar-text-lg);
  line-height: 1;
  color: var(--scholar-slate);
  background-color: transparent;
  border: 1px solid transparent;
  border-radius: var(--scholar-radius-sm);
  transition: box-shadow var(--scholar-transition-fast);
}

.navbar-toggler:hover {
  color: var(--scholar-ink);
}

.navbar-toggler:focus {
  outline: 0;
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.15);
}

.navbar-toggler-icon {
  display: inline-block;
  width: 1.5em;
  height: 1.5em;
  vertical-align: middle;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%280, 0, 0, 0.55%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100%;
}

/* ==========================================================================
   NAVBAR THEMES
   ========================================================================== */
/* Light navbar (default) */
.navbar-light .navbar-brand {
  color: var(--scholar-ink);
}

.navbar-light .navbar-brand:hover,
.navbar-light .navbar-brand:focus {
  color: var(--scholar-orange);
}

.navbar-light .navbar-nav .nav-link {
  color: var(--scholar-slate);
}

.navbar-light .navbar-nav .nav-link:hover,
.navbar-light .navbar-nav .nav-link:focus {
  color: var(--scholar-orange);
}

.navbar-light .navbar-nav .nav-link.disabled {
  color: var(--scholar-fog);
}

.navbar-light .navbar-nav .show > .nav-link,
.navbar-light .navbar-nav .nav-link.active {
  color: var(--scholar-orange);
}

.navbar-light .navbar-toggler {
  color: var(--scholar-slate);
  border-color: var(--scholar-steam);
}

.navbar-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='%236b7280' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar-light .navbar-text {
  color: var(--scholar-slate);
}

.navbar-light .navbar-text a,
.navbar-light .navbar-text a:hover,
.navbar-light .navbar-text a:focus {
  color: var(--scholar-orange);
}

/* Dark navbar */
.navbar-dark .navbar-brand {
  color: var(--scholar-white);
}

.navbar-dark .navbar-brand:hover,
.navbar-dark .navbar-brand:focus {
  color: var(--scholar-coral);
}

.navbar-dark .navbar-nav .nav-link {
  color: rgba(255, 255, 255, 0.75);
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link:focus {
  color: var(--scholar-white);
}

.navbar-dark .navbar-nav .nav-link.disabled {
  color: rgba(255, 255, 255, 0.25);
}

.navbar-dark .navbar-nav .show > .nav-link,
.navbar-dark .navbar-nav .nav-link.active {
  color: var(--scholar-white);
}

.navbar-dark .navbar-toggler {
  color: rgba(255, 255, 255, 0.75);
  border-color: rgba(255, 255, 255, 0.1);
}

.navbar-dark .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%28255, 255, 255, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar-dark .navbar-text {
  color: rgba(255, 255, 255, 0.75);
}

.navbar-dark .navbar-text a,
.navbar-dark .navbar-text a:hover,
.navbar-dark .navbar-text a:focus {
  color: var(--scholar-white);
}

/* ==========================================================================
   RESPONSIVE NAVBAR
   ========================================================================== */
@media (min-width: 576px) {
  .navbar-expand-sm {
    flex-wrap: nowrap;
    justify-content: flex-start;
  }
  
  .navbar-expand-sm .navbar-nav {
    flex-direction: row;
  }
  
  .navbar-expand-sm .navbar-nav .nav-link {
    padding-right: var(--scholar-space-3);
    padding-left: var(--scholar-space-3);
  }
  
  .navbar-expand-sm .navbar-collapse {
    display: flex !important;
    flex-basis: auto;
  }
  
  .navbar-expand-sm .navbar-toggler {
    display: none;
  }
}

@media (min-width: 768px) {
  .navbar-expand-md {
    flex-wrap: nowrap;
    justify-content: flex-start;
  }
  
  .navbar-expand-md .navbar-nav {
    flex-direction: row;
  }
  
  .navbar-expand-md .navbar-nav .nav-link {
    padding-right: var(--scholar-space-3);
    padding-left: var(--scholar-space-3);
  }
  
  .navbar-expand-md .navbar-collapse {
    display: flex !important;
    flex-basis: auto;
  }
  
  .navbar-expand-md .navbar-toggler {
    display: none;
  }
}

@media (min-width: 992px) {
  .navbar-expand-lg {
    flex-wrap: nowrap;
    justify-content: flex-start;
  }
  
  .navbar-expand-lg .navbar-nav {
    flex-direction: row;
  }
  
  .navbar-expand-lg .navbar-nav .nav-link {
    padding-right: var(--scholar-space-3);
    padding-left: var(--scholar-space-3);
  }
  
  .navbar-expand-lg .navbar-collapse {
    display: flex !important;
    flex-basis: auto;
  }
  
  .navbar-expand-lg .navbar-toggler {
    display: none;
  }
}

@media (min-width: 1200px) {
  .navbar-expand-xl {
    flex-wrap: nowrap;
    justify-content: flex-start;
  }
  
  .navbar-expand-xl .navbar-nav {
    flex-direction: row;
  }
  
  .navbar-expand-xl .navbar-nav .nav-link {
    padding-right: var(--scholar-space-3);
    padding-left: var(--scholar-space-3);
  }
  
  .navbar-expand-xl .navbar-collapse {
    display: flex !important;
    flex-basis: auto;
  }
  
  .navbar-expand-xl .navbar-toggler {
    display: none;
  }
}

@media (min-width: 1400px) {
  .navbar-expand-xxl {
    flex-wrap: nowrap;
    justify-content: flex-start;
  }
  
  .navbar-expand-xxl .navbar-nav {
    flex-direction: row;
  }
  
  .navbar-expand-xxl .navbar-nav .nav-link {
    padding-right: var(--scholar-space-3);
    padding-left: var(--scholar-space-3);
  }
  
  .navbar-expand-xxl .navbar-collapse {
    display: flex !important;
    flex-basis: auto;
  }
  
  .navbar-expand-xxl .navbar-toggler {
    display: none;
  }
}

/* ==========================================================================
   BREADCRUMB
   ========================================================================== */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  padding: var(--scholar-space-3) 0;
  margin-bottom: var(--scholar-space-4);
  list-style: none;
  background-color: transparent;
  border-radius: 0;
  font-size: var(--scholar-text-sm);
}

.breadcrumb-item + .breadcrumb-item {
  padding-left: var(--scholar-space-3);
}

.breadcrumb-item + .breadcrumb-item::before {
  float: left;
  padding-right: var(--scholar-space-3);
  color: var(--scholar-slate);
  content: '/';
}

.breadcrumb-item.active {
  color: var(--scholar-slate);
}

.breadcrumb-item a {
  color: var(--scholar-graphite);
  text-decoration: none;
}

.breadcrumb-item a:hover {
  color: var(--scholar-orange);
  text-decoration: underline;
}

/* ==========================================================================
   PAGINATION
   ========================================================================== */
.pagination {
  display: flex;
  padding-left: 0;
  list-style: none;
}

.page-link {
  position: relative;
  display: block;
  padding: var(--scholar-space-2) var(--scholar-space-3);
  font-size: var(--scholar-text-base);
  color: var(--scholar-orange);
  text-decoration: none;
  background-color: var(--scholar-white);
  border: 1px solid var(--scholar-steam);
  transition: color var(--scholar-transition-fast), 
              background-color var(--scholar-transition-fast), 
              border-color var(--scholar-transition-fast);
}

.page-link:hover {
  z-index: 2;
  color: var(--scholar-ember);
  background-color: var(--scholar-snow);
  border-color: var(--scholar-steam);
}

.page-link:focus {
  z-index: 3;
  color: var(--scholar-ember);
  background-color: var(--scholar-snow);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.15);
}

.page-item:not(:first-child) .page-link {
  margin-left: -1px;
}

.page-item.active .page-link {
  z-index: 3;
  color: var(--scholar-white);
  background-color: var(--scholar-orange);
  border-color: var(--scholar-orange);
}

.page-item.disabled .page-link {
  color: var(--scholar-fog);
  pointer-events: none;
  background-color: var(--scholar-white);
  border-color: var(--scholar-steam);
}

/* Pagination sizing */
.pagination-lg .page-link {
  padding: var(--scholar-space-3) var(--scholar-space-4);
  font-size: var(--scholar-text-lg);
}

.pagination-sm .page-link {
  padding: var(--scholar-space-1) var(--scholar-space-2);
  font-size: var(--scholar-text-sm);
}

/* ==========================================================================
   FIXED NAVBAR POSITIONS
   ========================================================================== */
.navbar-fixed-top {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: var(--scholar-z-fixed);
}

.navbar-fixed-bottom {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: var(--scholar-z-fixed);
}

.navbar-sticky-top {
  position: sticky;
  top: 0;
  z-index: var(--scholar-z-sticky);
}

/* Offset for fixed navbar */
body.navbar-fixed-padding {
  padding-top: 56px;
}
/**
 * ScholarCSS Effects & Depth
 * Creative visual techniques: glassmorphism, reflections, dive layers
 */

/* ==========================================================================
   GLASSMORPHISM (Frosted Glass)
   Subtle transparency blur for overlays, modals, cards
   ========================================================================== */
.glass,
.glass-sm,
.glass-lg {
  background: rgba(250, 251, 252, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 
    0 4px 30px rgba(0, 0, 0, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.glass-dark {
  background: rgba(31, 41, 55, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--scholar-white);
}

.glass-dark .card-title,
.glass-dark h1, .glass-dark h2, .glass-dark h3,
.glass-dark h4, .glass-dark h5, .glass-dark h6 {
  color: var(--scholar-white);
}

.glass-sm {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.glass-lg {
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(250, 251, 252, 0.8);
}

/* Glass card variant */
.card-glass {
  background: rgba(250, 251, 252, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.card-glass::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(255, 255, 255, 0.8) 50%, 
    transparent 100%
  );
}

/* ==========================================================================
   REFLECTION SYSTEM
   Mirror/reflective effects inspired by TE's glossy surfaces
   ========================================================================== */

/* Reflection below element */
.reflect-below {
  -webkit-box-reflect: below 0 
    linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0) 70%, rgba(0,0,0,0.1) 100%);
}

.reflect-below-fade {
  -webkit-box-reflect: below 0 
    linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.3) 100%);
}

/* Reflection above */
.reflect-above {
  -webkit-box-reflect: above 0 
    linear-gradient(to top, rgba(0,0,0,0) 0%, rgba(0,0,0,0.1) 100%);
}

/* Specular highlight overlay (glossy surface effect) */
.specular {
  position: relative;
  overflow: hidden;
}

.specular::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.2) 50%,
    transparent 100%
  );
  transform: skewX(-25deg);
  animation: specular-sweep 8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes specular-sweep {
  0%, 100% { left: -100%; }
  50% { left: 150%; }
}

/* Subtle sheen on hover */
.sheen {
  position: relative;
  overflow: hidden;
}

.sheen::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at center,
    rgba(255, 255, 255, 0.15) 0%,
    transparent 60%
  );
  opacity: 0;
  transition: opacity var(--scholar-transition-slow);
  pointer-events: none;
}

.sheen:hover::after {
  opacity: 1;
}

/* ==========================================================================
   DIVE DEPTH SYSTEM
   Layered shadows creating dimensional depth
   ========================================================================== */

/* Depth layers - subtle z-axis positioning */
.dive-1 {
  box-shadow: 
    0 1px 1px rgba(0, 0, 0, 0.02),
    0 2px 2px rgba(0, 0, 0, 0.02),
    0 4px 4px rgba(0, 0, 0, 0.02);
}

.dive-2 {
  box-shadow: 
    0 1px 1px rgba(0, 0, 0, 0.03),
    0 2px 2px rgba(0, 0, 0, 0.03),
    0 4px 4px rgba(0, 0, 0, 0.03),
    0 8px 8px rgba(0, 0, 0, 0.03);
}

.dive-3 {
  box-shadow: 
    0 2px 2px rgba(0, 0, 0, 0.04),
    0 4px 4px rgba(0, 0, 0, 0.04),
    0 8px 8px rgba(0, 0, 0, 0.04),
    0 16px 16px rgba(0, 0, 0, 0.04);
}

.dive-4 {
  box-shadow: 
    0 4px 4px rgba(0, 0, 0, 0.05),
    0 8px 8px rgba(0, 0, 0, 0.05),
    0 16px 16px rgba(0, 0, 0, 0.05),
    0 32px 32px rgba(0, 0, 0, 0.05);
}

.dive-5 {
  box-shadow: 
    0 8px 8px rgba(0, 0, 0, 0.06),
    0 16px 16px rgba(0, 0, 0, 0.06),
    0 32px 32px rgba(0, 0, 0, 0.06),
    0 64px 64px rgba(0, 0, 0, 0.06);
}

/* Dive with color tint (orange atmosphere) */
.dive-warm {
  box-shadow: 
    0 4px 4px rgba(255, 107, 53, 0.04),
    0 8px 8px rgba(255, 107, 53, 0.03),
    0 16px 16px rgba(255, 107, 53, 0.02),
    0 32px 32px rgba(255, 107, 53, 0.01);
}

/* Dive with cool tint */
.dive-cool {
  box-shadow: 
    0 4px 4px rgba(59, 130, 246, 0.04),
    0 8px 8px rgba(59, 130, 246, 0.03),
    0 16px 16px rgba(59, 130, 246, 0.02),
    0 32px 32px rgba(59, 130, 246, 0.01);
}

/* Floating effect with animation */
.dive-float {
  animation: dive-float 6s ease-in-out infinite;
}

@keyframes dive-float {
  0%, 100% { 
    transform: translateY(0);
    box-shadow: 
      0 4px 6px rgba(0, 0, 0, 0.05),
      0 10px 20px rgba(0, 0, 0, 0.04);
  }
  50% { 
    transform: translateY(-8px);
    box-shadow: 
      0 12px 20px rgba(0, 0, 0, 0.08),
      0 20px 40px rgba(0, 0, 0, 0.06);
  }
}

/* Sinking effect on hover */
.dive-sink {
  transition: transform var(--scholar-transition-base), 
              box-shadow var(--scholar-transition-base);
}

.dive-sink:hover {
  transform: translateY(2px);
  box-shadow: 
    0 1px 2px rgba(0, 0, 0, 0.05),
    0 2px 4px rgba(0, 0, 0, 0.04);
}

/* ==========================================================================
   SUBTLE TEXTURES & PATTERNS
   Academic paper textures and technical grid patterns
   ========================================================================== */

/* Technical grid pattern */
.bg-grid {
  background-image: 
    linear-gradient(var(--scholar-steam) 1px, transparent 1px),
    linear-gradient(90deg, var(--scholar-steam) 1px, transparent 1px);
  background-size: 24px 24px;
  background-position: center center;
}

/* Dot grid */
.bg-dots {
  background-image: radial-gradient(var(--scholar-fog) 1px, transparent 1px);
  background-size: 16px 16px;
}

/* Paper texture overlay */
.bg-paper {
  position: relative;
}

.bg-paper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.03;
  pointer-events: none;
  mix-blend-mode: multiply;
}

/* Subtle grain texture */
.texture-grain {
  position: relative;
}

.texture-grain::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  opacity: 0.04;
  pointer-events: none;
}

/* ==========================================================================
   HALO & GLOW EFFECTS
   Soft illumination for important elements
   ========================================================================== */

/* Orange halo glow */
.halo-orange {
  box-shadow: 
    0 0 0 1px rgba(255, 107, 53, 0.1),
    0 0 0 4px rgba(255, 107, 53, 0.05),
    0 0 20px rgba(255, 107, 53, 0.15);
}

.halo-orange-sm {
  box-shadow: 
    0 0 0 2px rgba(255, 107, 53, 0.08),
    0 0 10px rgba(255, 107, 53, 0.1);
}

/* Cool halo */
.halo-cool {
  box-shadow: 
    0 0 0 1px rgba(59, 130, 246, 0.1),
    0 0 0 4px rgba(59, 130, 246, 0.05),
    0 0 20px rgba(59, 130, 246, 0.15);
}

/* Warm halo */
.halo-warm {
  box-shadow: 
    0 0 0 1px rgba(245, 158, 11, 0.1),
    0 0 0 4px rgba(245, 158, 11, 0.05),
    0 0 20px rgba(245, 158, 11, 0.15);
}

/* Pulsing halo for attention */
.halo-pulse {
  animation: halo-pulse 2s ease-in-out infinite;
}

@keyframes halo-pulse {
  0%, 100% {
    box-shadow: 
      0 0 0 0 rgba(255, 107, 53, 0.2),
      0 0 0 4px rgba(255, 107, 53, 0.1);
  }
  50% {
    box-shadow: 
      0 0 0 8px rgba(255, 107, 53, 0),
      0 0 0 12px rgba(255, 107, 53, 0);
  }
}

/* ==========================================================================
   REGISTRATION MARKS
   Print-inspired corner marks for academic precision aesthetic
   ========================================================================== */

.registration-marks {
  position: relative;
}

.registration-marks::before,
.registration-marks::after,
.registration-marks > *::before,
.registration-marks > *::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  border-color: var(--scholar-fog);
  border-style: solid;
  pointer-events: none;
}

.registration-marks::before {
  top: -4px;
  left: -4px;
  border-width: 1px 0 0 1px;
}

.registration-marks::after {
  top: -4px;
  right: -4px;
  border-width: 1px 1px 0 0;
}

.registration-marks > *::before {
  bottom: -4px;
  left: -4px;
  border-width: 0 0 1px 1px;
}

.registration-marks > *::after {
  bottom: -4px;
  right: -4px;
  border-width: 0 1px 1px 0;
}

/* Minimal crop marks */
.crop-marks {
  position: relative;
}

.crop-marks::before {
  content: '';
  position: absolute;
  top: 4px;
  left: 4px;
  right: 4px;
  bottom: 4px;
  border: 1px solid rgba(234, 236, 239, 0.5);
  pointer-events: none;
}

/* ==========================================================================
   INSET DEPTH
   Recessed/pushed-in appearance
   ========================================================================== */

.inset {
  box-shadow: 
    inset 0 1px 3px rgba(0, 0, 0, 0.08),
    inset 0 2px 6px rgba(0, 0, 0, 0.05);
  background-color: var(--scholar-snow);
}

.inset-sm {
  box-shadow: 
    inset 0 1px 2px rgba(0, 0, 0, 0.06);
  background-color: var(--scholar-snow);
}

/* Pressed button state */
.btn-pressed:active,
.btn-pressed.active {
  box-shadow: 
    inset 0 2px 4px rgba(0, 0, 0, 0.1);
  transform: translateY(1px);
}

/* ==========================================================================
   PARALLAX DEPTH LAYERS
   For scroll-based dimensional effects
   ========================================================================== */

.parallax-container {
  perspective: 1000px;
  transform-style: preserve-3d;
}

.depth-1 { transform: translateZ(10px); }
.depth-2 { transform: translateZ(20px); }
.depth-3 { transform: translateZ(40px); }
.depth-4 { transform: translateZ(80px); }
.depth-5 { transform: translateZ(160px); }

/* ==========================================================================
   CHROMATIC ABERRATION
   Subtle split-color effect for tech aesthetic
   ========================================================================== */

.chromatic {
  position: relative;
}

.chromatic::before,
.chromatic::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.8;
}

.chromatic::before {
  color: rgba(255, 107, 53, 0.3);
  transform: translateX(-1px);
  mix-blend-mode: multiply;
}

.chromatic::after {
  color: rgba(59, 130, 246, 0.3);
  transform: translateX(1px);
  mix-blend-mode: multiply;
}

/* ==========================================================================
   SCANLINES (subtle)
   For displays and technical aesthetic
   ========================================================================== */

.scanlines {
  position: relative;
}

.scanlines::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.02) 2px,
    rgba(0, 0, 0, 0.02) 4px
  );
  pointer-events: none;
  opacity: 0.5;
}

/* ==========================================================================
   FOCUS DIVE
   Enhanced focus states with depth
   ========================================================================== */

.focus-dive:focus-visible {
  outline: none;
  box-shadow: 
    0 0 0 2px var(--scholar-white),
    0 0 0 4px var(--scholar-orange),
    0 0 20px rgba(255, 107, 53, 0.3);
  transform: translateY(-2px);
}

/* ==========================================================================
   MORPHING BORDERS
   Animated border transitions
   ========================================================================== */

.morph-border {
  position: relative;
  background: var(--scholar-white);
}

.morph-border::before {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  bottom: -1px;
  background: linear-gradient(45deg, 
    var(--scholar-orange) 0%, 
    var(--scholar-coral) 25%,
    var(--scholar-tangerine) 50%,
    var(--scholar-coral) 75%,
    var(--scholar-orange) 100%
  );
  background-size: 300% 300%;
  z-index: -1;
  opacity: 0;
  transition: opacity var(--scholar-transition-base);
}

.morph-border:hover::before {
  opacity: 1;
  animation: gradient-shift 3s ease infinite;
}

@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
/**
 * ScholarCSS Animations
 * Purposeful micro-interactions and transitions
 */

/* ==========================================================================
   FADE TRANSITIONS
   ========================================================================== */
.fade {
  opacity: 0;
  transition: opacity var(--scholar-transition-base);
}

.fade.show {
  opacity: 1;
}

.fade-in {
  animation: fade-in var(--scholar-transition-slow) ease forwards;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.fade-in-up {
  animation: fade-in-up var(--scholar-transition-slow) ease forwards;
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-down {
  animation: fade-in-down var(--scholar-transition-slow) ease forwards;
}

@keyframes fade-in-down {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   SLIDE TRANSITIONS
   ========================================================================== */
.slide-in-left {
  animation: slide-in-left var(--scholar-transition-slow) ease forwards;
}

@keyframes slide-in-left {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.slide-in-right {
  animation: slide-in-right var(--scholar-transition-slow) ease forwards;
}

@keyframes slide-in-right {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ==========================================================================
   SCALE TRANSITIONS
   ========================================================================== */
.scale-in {
  animation: scale-in var(--scholar-transition-slow) ease forwards;
}

@keyframes scale-in {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.scale-in-sm {
  animation: scale-in-sm var(--scholar-transition-slow) ease forwards;
}

@keyframes scale-in-sm {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ==========================================================================
   STAGGERED ENTRANCE
   For lists and grids
   ========================================================================== */
.stagger-1 { animation-delay: 0.05s; }
.stagger-2 { animation-delay: 0.1s; }
.stagger-3 { animation-delay: 0.15s; }
.stagger-4 { animation-delay: 0.2s; }
.stagger-5 { animation-delay: 0.25s; }
.stagger-6 { animation-delay: 0.3s; }
.stagger-7 { animation-delay: 0.35s; }
.stagger-8 { animation-delay: 0.4s; }
.stagger-9 { animation-delay: 0.45s; }
.stagger-10 { animation-delay: 0.5s; }

/* Apply to children */
.stagger-children > * {
  opacity: 0;
  animation: fade-in-up var(--scholar-transition-slow) ease forwards;
}

.stagger-children > *:nth-child(1) { animation-delay: 0.05s; }
.stagger-children > *:nth-child(2) { animation-delay: 0.1s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.15s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.2s; }
.stagger-children > *:nth-child(5) { animation-delay: 0.25s; }
.stagger-children > *:nth-child(6) { animation-delay: 0.3s; }
.stagger-children > *:nth-child(7) { animation-delay: 0.35s; }
.stagger-children > *:nth-child(8) { animation-delay: 0.4s; }

/* ==========================================================================
   HOVER LIFT
   Subtle elevation on hover
   ========================================================================== */
.hover-lift {
  transition: transform var(--scholar-transition-fast),
              box-shadow var(--scholar-transition-fast);
}

.hover-lift:hover {
  transform: translateY(-3px);
  box-shadow: var(--scholar-shadow-lg);
}

/* ==========================================================================
   SPINNERS
   Loading indicators
   ========================================================================== */
.spinner {
  display: inline-block;
  width: 1.5rem;
  height: 1.5rem;
  border: 2px solid var(--scholar-steam);
  border-right-color: var(--scholar-orange);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

.spinner-sm {
  width: 1rem;
  height: 1rem;
  border-width: 1.5px;
}

.spinner-lg {
  width: 2rem;
  height: 2rem;
  border-width: 3px;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Dots spinner */
.spinner-dots {
  display: inline-flex;
  gap: 4px;
}

.spinner-dots span {
  width: 8px;
  height: 8px;
  background-color: var(--scholar-orange);
  border-radius: 50%;
  animation: spinner-dots 1.4s ease-in-out infinite both;
}

.spinner-dots span:nth-child(1) { animation-delay: -0.32s; }
.spinner-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes spinner-dots {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}

/* ==========================================================================
   PULSE
   Attention indicator
   ========================================================================== */
.pulse {
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Badge pulse */
.pulse-ring {
  position: relative;
}

.pulse-ring::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: inherit;
  box-shadow: 0 0 0 0 rgba(255, 107, 53, 0.4);
  animation: pulse-ring 1.5s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 107, 53, 0.4); }
  70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(255, 107, 53, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 107, 53, 0); }
}

/* ==========================================================================
   SHIMMER
   Loading placeholder effect
   ========================================================================== */
.shimmer {
  background: linear-gradient(
    90deg,
    var(--scholar-snow) 25%,
    var(--scholar-white) 50%,
    var(--scholar-snow) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

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

/* ==========================================================================
   BOUNCE
   Playful attention
   ========================================================================== */
.bounce {
  animation: bounce 1s ease infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ==========================================================================
   SHAKE
   Error/warning indicator
   ========================================================================== */
.shake {
  animation: shake 0.5s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
  20%, 40%, 60%, 80% { transform: translateX(4px); }
}

/* ==========================================================================
   TYPEWRITER
   For code/educational feel
   ========================================================================== */
.typewriter {
  overflow: hidden;
  border-right: 2px solid var(--scholar-orange);
  white-space: nowrap;
  animation: 
    typing 3s steps(40, end),
    blink-caret 0.75s step-end infinite;
}

@keyframes typing {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes blink-caret {
  from, to { border-color: transparent; }
  50% { border-color: var(--scholar-orange); }
}

/* ==========================================================================
   ROTATE IN
   ========================================================================== */
.rotate-in {
  animation: rotate-in var(--scholar-transition-slow) ease forwards;
}

@keyframes rotate-in {
  from {
    opacity: 0;
    transform: rotate(-10deg) scale(0.95);
  }
  to {
    opacity: 1;
    transform: rotate(0) scale(1);
  }
}

/* ==========================================================================
   FLIP IN
   ========================================================================== */
.flip-in-x {
  animation: flip-in-x var(--scholar-transition-slow) ease forwards;
  backface-visibility: visible;
}

@keyframes flip-in-x {
  from {
    transform: perspective(400px) rotateX(90deg);
    opacity: 0;
  }
  to {
    transform: perspective(400px) rotateX(0deg);
    opacity: 1;
  }
}

/* ==========================================================================
   SKELETON LOADING
   ========================================================================== */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--scholar-snow) 0%,
    var(--scholar-steam) 50%,
    var(--scholar-snow) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: var(--scholar-radius-sm);
}

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

.skeleton-text {
  height: 1em;
  margin-bottom: 0.5em;
}

.skeleton-text:last-child {
  width: 80%;
}

.skeleton-title {
  height: 1.5em;
  width: 60%;
  margin-bottom: 1em;
}

.skeleton-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

.skeleton-card {
  min-height: 200px;
}
/**
 * ScholarCSS Prismatic & Reflection System
 * Unique subtle visual techniques: chromatic edges, mirror reflections, depth caustics
 */

/* ==========================================================================
   PRISMATIC EDGE
   Subtle chromatic aberration at element edges — light refracting through glass
   ========================================================================== */

.prismatic {
  position: relative;
}

.prismatic::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border: 1px solid transparent;
  border-radius: inherit;
  background: linear-gradient(
    135deg,
    rgba(255, 107, 53, 0.15) 0%,
    rgba(255, 140, 97, 0.1) 25%,
    rgba(255, 170, 0, 0.15) 50%,
    rgba(59, 130, 246, 0.1) 75%,
    rgba(255, 107, 53, 0.15) 100%
  );
  -webkit-mask: 
    linear-gradient(#fff 0 0) content-box, 
    linear-gradient(#fff 0 0);
  mask: 
    linear-gradient(#fff 0 0) content-box, 
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  padding: 1px;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--scholar-transition-slow);
}

.prismatic:hover::before {
  opacity: 1;
}

/* Prismatic with animation */
.prismatic-animated::before {
  opacity: 1;
  background: linear-gradient(
    135deg,
    rgba(255, 107, 53, 0.2) 0%,
    rgba(255, 140, 97, 0.15) 25%,
    rgba(255, 170, 0, 0.2) 50%,
    rgba(59, 130, 246, 0.15) 75%,
    rgba(255, 107, 53, 0.2) 100%
  );
  background-size: 200% 200%;
  animation: prismatic-shift 4s ease infinite;
}

@keyframes prismatic-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Subtle prismatic border on focus */
.prismatic-focus:focus-visible {
  outline: none;
  box-shadow: 
    0 0 0 1px rgba(255, 107, 53, 0.3),
    0 0 0 2px rgba(255, 170, 0, 0.2),
    0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* ==========================================================================
   MIRROR REFLECTION SYSTEM
   True reflections using transform and mask — elements reflect into a "surface"
   ========================================================================== */

/* Base mirror reflection */
.mirror-reflect {
  position: relative;
  margin-bottom: 60px; /* Space for reflection */
}

.mirror-reflect::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 60px;
  background: inherit;
  transform: scaleY(-1);
  transform-origin: top;
  mask-image: linear-gradient(to bottom, 
    rgba(0,0,0,0.4) 0%, 
    rgba(0,0,0,0.1) 50%, 
    transparent 100%
  );
  -webkit-mask-image: linear-gradient(to bottom, 
    rgba(0,0,0,0.4) 0%, 
    rgba(0,0,0,0.1) 50%, 
    transparent 100%
  );
  opacity: 0.6;
  pointer-events: none;
  filter: blur(1px);
}

/* Mirror with floor fade */
.mirror-floor {
  position: relative;
}

.mirror-floor::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40%;
  background: linear-gradient(to top, 
    var(--scholar-white) 0%, 
    transparent 100%
  );
  pointer-events: none;
  z-index: 1;
}

/* Reflection container — parent creates the "surface" */
.reflection-surface {
  position: relative;
  background: linear-gradient(to bottom, 
    var(--scholar-snow) 0%, 
    var(--scholar-white) 50%,
    var(--scholar-steam) 100%
  );
}

.reflection-surface::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    var(--scholar-fog) 20%, 
    var(--scholar-fog) 80%, 
    transparent 100%
  );
  opacity: 0.5;
}

/* ==========================================================================
   DIVE ELEMENT REFLECTION
   Elements that reflect their dive depth — deeper elements cast stronger reflections
   ========================================================================== */

/* Base dive-reflect class */
.dive-reflect {
  position: relative;
}

.dive-reflect::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 5%;
  right: 5%;
  height: var(--reflect-height, 20px);
  background: inherit;
  transform: scaleY(-1);
  transform-origin: top;
  mask-image: linear-gradient(to bottom, 
    rgba(0,0,0,var(--reflect-opacity, 0.2)) 0%, 
    transparent 100%
  );
  -webkit-mask-image: linear-gradient(to bottom, 
    rgba(0,0,0,var(--reflect-opacity, 0.2)) 0%, 
    transparent 100%
  );
  filter: blur(var(--reflect-blur, 2px));
  pointer-events: none;
  border-radius: inherit;
}

/* Dive 1: Subtle reflection */
.dive-1.dive-reflect {
  --reflect-height: 15px;
  --reflect-opacity: 0.15;
  --reflect-blur: 1px;
}

/* Dive 2: Light reflection */
.dive-2.dive-reflect {
  --reflect-height: 25px;
  --reflect-opacity: 0.2;
  --reflect-blur: 2px;
}

/* Dive 3: Medium reflection */
.dive-3.dive-reflect {
  --reflect-height: 35px;
  --reflect-opacity: 0.25;
  --reflect-blur: 3px;
}

/* Dive 4: Strong reflection */
.dive-4.dive-reflect {
  --reflect-height: 50px;
  --reflect-opacity: 0.3;
  --reflect-blur: 4px;
}

/* Dive 5: Maximum reflection */
.dive-5.dive-reflect {
  --reflect-height: 70px;
  --reflect-opacity: 0.35;
  --reflect-blur: 5px;
}

/* Warm dive reflection (orange tint) */
.dive-warm.dive-reflect::after {
  background: linear-gradient(to bottom, 
    rgba(255, 107, 53, 0.1) 0%, 
    transparent 100%
  );
}

/* Cool dive reflection (blue tint) */
.dive-cool.dive-reflect::after {
  background: linear-gradient(to bottom, 
    rgba(59, 130, 246, 0.1) 0%, 
    transparent 100%
  );
}

/* ==========================================================================
   CAUSTICS LIGHT PATTERN
   Light refraction patterns — like sunlight through water on pool floor
   ========================================================================== */

.caustics {
  position: relative;
  overflow: hidden;
}

.caustics::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  right: -50%;
  bottom: -50%;
  background: 
    radial-gradient(ellipse 80% 50% at 30% 40%, rgba(255, 170, 0, 0.03) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 70% 60%, rgba(255, 107, 53, 0.02) 0%, transparent 50%),
    radial-gradient(ellipse 50% 30% at 50% 50%, rgba(255, 140, 97, 0.02) 0%, transparent 50%);
  animation: caustics-shift 8s ease-in-out infinite;
  pointer-events: none;
  mix-blend-mode: overlay;
}

@keyframes caustics-shift {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg) scale(1);
  }
  25% {
    transform: translate(2%, -1%) rotate(1deg) scale(1.02);
  }
  50% {
    transform: translate(-1%, 2%) rotate(-1deg) scale(0.98);
  }
  75% {
    transform: translate(-2%, -2%) rotate(0.5deg) scale(1.01);
  }
}

/* Caustics with stronger effect */
.caustics-strong::before {
  background: 
    radial-gradient(ellipse 80% 50% at 30% 40%, rgba(255, 170, 0, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 70% 60%, rgba(255, 107, 53, 0.04) 0%, transparent 50%),
    radial-gradient(ellipse 50% 30% at 50% 50%, rgba(255, 140, 97, 0.04) 0%, transparent 50%);
}

/* ==========================================================================
   DEPTH-AWARE GRAIN
   Texture intensity increases with dive depth — deeper = more atmospheric haze
   ========================================================================== */

/* Base grain that responds to dive depth */
.dive-grain {
  position: relative;
}

.dive-grain::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  opacity: var(--grain-opacity, 0.03);
  pointer-events: none;
  mix-blend-mode: overlay;
  transition: opacity var(--scholar-transition-slow);
}

/* Grain intensity by dive depth */
.dive-1.dive-grain { --grain-opacity: 0.02; }
.dive-2.dive-grain { --grain-opacity: 0.03; }
.dive-3.dive-grain { --grain-opacity: 0.04; }
.dive-4.dive-grain { --grain-opacity: 0.05; }
.dive-5.dive-grain { --grain-opacity: 0.06; }

/* ==========================================================================
   LIQUID EDGE
   Organic, slightly irregular border — like liquid surface tension
   ========================================================================== */

.liquid-edge {
  position: relative;
  border-radius: 2px 8px 4px 12px;
  transition: border-radius var(--scholar-transition-slow);
}

.liquid-edge:hover {
  border-radius: 8px 2px 12px 4px;
}

/* More pronounced liquid effect */
.liquid-morph {
  animation: liquid-morph 6s ease-in-out infinite;
}

@keyframes liquid-morph {
  0%, 100% { border-radius: 2px 8px 4px 12px / 8px 4px 12px 2px; }
  25% { border-radius: 8px 4px 12px 2px / 4px 12px 2px 8px; }
  50% { border-radius: 4px 12px 2px 8px / 12px 2px 8px 4px; }
  75% { border-radius: 12px 2px 8px 4px / 2px 8px 4px 12px; }
}

/* ==========================================================================
   ATMOSPHERIC PERSPECTIVE
   Elements fade and blur with perceived distance
   ========================================================================== */

.atmosphere-1 { opacity: 0.95; filter: blur(0.3px); }
.atmosphere-2 { opacity: 0.9; filter: blur(0.5px); }
.atmosphere-3 { opacity: 0.8; filter: blur(0.8px); }
.atmosphere-4 { opacity: 0.7; filter: blur(1px); }
.atmosphere-5 { opacity: 0.6; filter: blur(1.5px); }

/* Atmospheric container — children fade into distance */
.atmospheric > *:nth-child(1) { opacity: 1; }
.atmospheric > *:nth-child(2) { opacity: 0.95; filter: blur(0.2px); }
.atmospheric > *:nth-child(3) { opacity: 0.9; filter: blur(0.4px); }
.atmospheric > *:nth-child(4) { opacity: 0.85; filter: blur(0.6px); }
.atmospheric > *:nth-child(5) { opacity: 0.8; filter: blur(0.8px); }

/* ==========================================================================
   POLARIZATION
   Subtle color shift at edges — like polarized glass
   ========================================================================== */

.polarize {
  position: relative;
}

.polarize::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, 
    rgba(255, 107, 53, 0.03) 0%, 
    transparent 30%, 
    transparent 70%, 
    rgba(59, 130, 246, 0.03) 100%
  );
  pointer-events: none;
  border-radius: inherit;
}

/* Polarize with rotation on hover */
.polarize-shift:hover::before {
  animation: polarize-rotate 3s linear infinite;
}

@keyframes polarize-rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   RIPPLE CONTAINER
   Click/tap creates ripple effect — element reflects interaction
   ========================================================================== */

.ripple-container {
  position: relative;
  overflow: hidden;
}

.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 107, 53, 0.3);
  transform: scale(0);
  animation: ripple-effect 0.6s linear;
  pointer-events: none;
}

@keyframes ripple-effect {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* ==========================================================================
   PARALLAX REFLECTION LAYERS
   Multi-layered parallax with reflection between layers
   ========================================================================== */

.parallax-mirror {
  perspective: 1000px;
  transform-style: preserve-3d;
  position: relative;
}

.parallax-layer {
  position: absolute;
  transform-style: preserve-3d;
}

.parallax-layer-1 { transform: translateZ(0); }
.parallax-layer-2 { transform: translateZ(20px); }
.parallax-layer-3 { transform: translateZ(40px); }

/* Reflection plane between layers */
.parallax-mirror::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(255, 107, 53, 0.1) 50%, 
    transparent 100%
  );
  transform: translateZ(10px);
  pointer-events: none;
}

/* ==========================================================================
   COMBINED EFFECTS
   Pre-built combinations for common use cases
   ========================================================================== */

/* Card with full treatment */
.card-artistic {
  position: relative;
  background: var(--scholar-white);
  border: 1px solid var(--scholar-steam);
  box-shadow: 
    0 4px 6px rgba(0, 0, 0, 0.03),
    0 10px 20px rgba(0, 0, 0, 0.02);
}

.card-artistic::before {
  /* Prismatic edge */
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  bottom: -1px;
  background: linear-gradient(
    135deg,
    rgba(255, 107, 53, 0.2) 0%,
    rgba(255, 170, 0, 0.1) 50%,
    rgba(59, 130, 246, 0.1) 100%
  );
  border-radius: inherit;
  z-index: -1;
  opacity: 0;
  transition: opacity var(--scholar-transition-slow);
}

.card-artistic:hover::before {
  opacity: 1;
}

.card-artistic::after {
  /* Caustics overlay */
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(ellipse 80% 50% at 30% 40%, rgba(255, 170, 0, 0.02) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 70% 60%, rgba(255, 107, 53, 0.015) 0%, transparent 50%);
  animation: caustics-shift 10s ease-in-out infinite;
  pointer-events: none;
  mix-blend-mode: overlay;
}

/* Dive card with reflection */
.card-reflective {
  position: relative;
  margin-bottom: 40px;
}

.card-reflective::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 5%;
  right: 5%;
  height: 30px;
  background: inherit;
  transform: scaleY(-1);
  transform-origin: top;
  mask-image: linear-gradient(to bottom, 
    rgba(0,0,0,0.2) 0%, 
    transparent 100%
  );
  -webkit-mask-image: linear-gradient(to bottom, 
    rgba(0,0,0,0.2) 0%, 
    transparent 100%
  );
  filter: blur(2px);
  pointer-events: none;
}

/* Floating glass with all effects */
.glass-float {
  background: rgba(250, 251, 252, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  animation: glass-float 6s ease-in-out infinite;
  position: relative;
}

@keyframes glass-float {
  0%, 100% { 
    transform: translateY(0);
    box-shadow: 
      0 8px 32px rgba(0, 0, 0, 0.06),
      inset 0 1px 0 rgba(255, 255, 255, 0.5);
  }
  50% { 
    transform: translateY(-8px);
    box-shadow: 
      0 20px 48px rgba(0, 0, 0, 0.1),
      inset 0 1px 0 rgba(255, 255, 255, 0.5);
  }
}

.glass-float::before {
  /* Prismatic highlight */
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(255, 255, 255, 0.8) 50%, 
    transparent 100%
  );
}

.glass-float::after {
  /* Caustics */
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(ellipse 80% 50% at 30% 40%, rgba(255, 107, 53, 0.03) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 70% 60%, rgba(255, 170, 0, 0.02) 0%, transparent 50%);
  animation: caustics-shift 8s ease-in-out infinite;
  pointer-events: none;
  mix-blend-mode: overlay;
  border-radius: inherit;
}
/**
 * ScholarCSS Teenage Engineering Refined
 * Reduced intensities, increased discoverable intricacy
 * Effects are felt, not seen; discovered, not announced
 */

/* ==========================================================================
   PRISMATIC EDGE — REFINED
   Chromatic light refraction at 40% intensity, 3x slower cycle
   ========================================================================== */

.te-prismatic {
  position: relative;
}

.te-prismatic::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border: 1px solid transparent;
  border-radius: inherit;
  background: linear-gradient(
    135deg,
    rgba(255, 107, 53, 0.06) 0%,
    rgba(255, 140, 97, 0.04) 50%,
    rgba(255, 170, 0, 0.06) 100%
  );
  -webkit-mask: 
    linear-gradient(#fff 0 0) content-box, 
    linear-gradient(#fff 0 0);
  mask: 
    linear-gradient(#fff 0 0) content-box, 
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  padding: 1px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 800ms cubic-bezier(0.4, 0, 0.2, 1);
  transition-delay: 400ms;
  mix-blend-mode: soft-light;
}

.te-prismatic:hover::before {
  opacity: 1;
  transition-delay: 0ms;
}

/* Multi-frequency prismatic with prime-number timing */
.te-prismatic-ambient::before {
  opacity: 0.04;
  background-size: 200% 200%;
  animation: te-prismatic-shift-1 20s ease-in-out infinite;
}

.te-prismatic-ambient::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: inherit;
  background: linear-gradient(
    45deg,
    rgba(59, 130, 246, 0.03) 0%,
    transparent 50%,
    rgba(255, 107, 53, 0.03) 100%
  );
  -webkit-mask: 
    linear-gradient(#fff 0 0) content-box, 
    linear-gradient(#fff 0 0);
  mask: 
    linear-gradient(#fff 0 0) content-box, 
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  padding: 1px;
  pointer-events: none;
  mix-blend-mode: soft-light;
  animation: te-prismatic-shift-2 23s ease-in-out infinite;
}

@keyframes te-prismatic-shift-1 {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes te-prismatic-shift-2 {
  0%, 100% { background-position: 100% 50%; }
  50% { background-position: 0% 50%; }
}

/* Focus state with delayed reveal */
.te-prismatic-focus:focus-visible {
  outline: none;
  box-shadow: 
    0 0 0 1px rgba(255, 107, 53, 0.12),
    0 0 0 2px rgba(255, 170, 0, 0.08),
    0 0 0 3px rgba(59, 130, 246, 0.04);
  transition: box-shadow 600ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   CAUSTICS — REFINED
   25% opacity, 2.5x slower, micro-movements, hover-activated
   ========================================================================== */

.te-caustics {
  position: relative;
  overflow: hidden;
}

.te-caustics::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  right: -50%;
  bottom: -50%;
  background: 
    radial-gradient(ellipse 80% 50% at 30% 40%, rgba(255, 170, 0, 0.008) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 70% 60%, rgba(255, 107, 53, 0.005) 0%, transparent 50%),
    radial-gradient(ellipse 50% 30% at 50% 50%, rgba(255, 140, 97, 0.005) 0%, transparent 50%),
    radial-gradient(ellipse 70% 40% at 40% 70%, rgba(255, 170, 0, 0.006) 0%, transparent 50%);
  animation: te-caustics-shift 20s ease-in-out infinite;
  animation-play-state: paused;
  pointer-events: none;
  mix-blend-mode: overlay;
  opacity: 0.6;
}

.te-caustics:hover::before {
  animation-play-state: running;
}

@keyframes te-caustics-shift {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg) scale(1);
  }
  25% {
    transform: translate(0.5%, -0.25%) rotate(0.3deg) scale(1.005);
  }
  50% {
    transform: translate(-0.25%, 0.5%) rotate(-0.3deg) scale(0.995);
  }
  75% {
    transform: translate(-0.5%, -0.5%) rotate(0.15deg) scale(1.002);
  }
}

/* Secondary caustics layer with prime timing */
.te-caustics::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  right: -50%;
  bottom: -50%;
  background: 
    radial-gradient(ellipse 60% 40% at 60% 30%, rgba(255, 107, 53, 0.006) 0%, transparent 50%);
  animation: te-caustics-shift-2 27s ease-in-out infinite;
  animation-play-state: paused;
  pointer-events: none;
  mix-blend-mode: soft-light;
  opacity: 0;
  transition: opacity 1s ease;
}

.te-caustics:hover::after {
  animation-play-state: running;
  opacity: 1;
}

@keyframes te-caustics-shift-2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(0.3%, 0.3%) scale(1.008); }
  66% { transform: translate(-0.3%, -0.2%) scale(0.992); }
}

/* ==========================================================================
   DIVE REFLECTION — REFINED
   70% opacity reduction, hover-only, breathing effect
   ========================================================================== */

.te-dive-reflect {
  position: relative;
}

.te-dive-reflect::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 2%;
  right: 2%;
  height: var(--reflect-height, 12px);
  background: inherit;
  transform: scaleY(-1);
  transform-origin: top;
  mask-image: linear-gradient(to bottom, 
    rgba(0,0,0,var(--reflect-opacity, 0.08)) 0%, 
    transparent 100%
  );
  -webkit-mask-image: linear-gradient(to bottom, 
    rgba(0,0,0,var(--reflect-opacity, 0.08)) 0%, 
    transparent 100%
  );
  filter: blur(var(--reflect-blur, 1px));
  pointer-events: none;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 600ms ease;
}

.te-dive-reflect:hover::after {
  opacity: 1;
  animation: te-reflect-breathe 6s ease-in-out infinite;
}

@keyframes te-reflect-breathe {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.92; }
}

/* Dive levels with reduced intensity */
.te-dive-reflect-1 { --reflect-height: 8px; --reflect-opacity: 0.04; --reflect-blur: 0.5px; }
.te-dive-reflect-2 { --reflect-height: 12px; --reflect-opacity: 0.06; --reflect-blur: 1px; }
.te-dive-reflect-3 { --reflect-height: 18px; --reflect-opacity: 0.08; --reflect-blur: 1.5px; }
.te-dive-reflect-4 { --reflect-height: 22px; --reflect-opacity: 0.10; --reflect-blur: 2px; }
.te-dive-reflect-5 { --reflect-height: 25px; --reflect-opacity: 0.12; --reflect-blur: 2px; }

/* Warm reflection with temperature shift */
.te-dive-reflect-warm::after {
  background: linear-gradient(to bottom, 
    rgba(255, 107, 53, 0.04) 0%, 
    rgba(255, 140, 97, 0.02) 50%,
    transparent 100%
  );
}

/* Cool reflection */
.te-dive-reflect-cool::after {
  background: linear-gradient(to bottom, 
    rgba(59, 130, 246, 0.04) 0%, 
    rgba(147, 197, 253, 0.02) 50%,
    transparent 100%
  );
}

/* ==========================================================================
   GLASSMORPHISM — REFINED
   Reduced blur, increased opacity, conditional activation
   ========================================================================== */

.te-glass {
  background: rgba(250, 251, 252, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  position: relative;
  transition: background 400ms ease, border-color 400ms ease;
}

.te-glass::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(255, 255, 255, 0.5) 20%,
    rgba(255, 255, 255, 0.8) 50%, 
    rgba(255, 255, 255, 0.5) 80%,
    transparent 100%
  );
  opacity: 0.6;
}

/* Glass that responds to scroll position via CSS custom property */
.te-glass-responsive {
  --scroll-opacity: 0.88;
  background: rgba(250, 251, 252, var(--scroll-opacity));
}

/* Dark glass refined */
.te-glass-dark {
  background: rgba(31, 41, 55, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--scholar-white);
}

/* ==========================================================================
   SPECULAR HIGHLIGHT — REFINED
   Single play per session, narrower sweep, variable velocity
   ========================================================================== */

.te-specular {
  position: relative;
  overflow: hidden;
}

.te-specular::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 25%;
  height: 100%;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.06) 40%,
    rgba(255, 255, 255, 0.08) 50%,
    rgba(255, 255, 255, 0.06) 60%,
    transparent 100%
  );
  transform: skewX(-15deg);
  animation: te-specular-sweep 15s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  animation-play-state: paused;
  pointer-events: none;
}

.te-specular.te-specular-active::after {
  animation-play-state: running;
}

@keyframes te-specular-sweep {
  0% { left: -25%; }
  40% { left: 50%; } /* Slows at center */
  100% { left: 125%; } /* Accelerates out */
}

/* Secondary faint highlight */
.te-specular::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 15%;
  height: 100%;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.03) 50%,
    transparent 100%
  );
  transform: skewX(-15deg);
  animation: te-specular-sweep-2 15s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  animation-delay: 2s;
  animation-play-state: paused;
  pointer-events: none;
}

.te-specular.te-specular-active::before {
  animation-play-state: running;
}

@keyframes te-specular-sweep-2 {
  0% { left: -15%; }
  100% { left: 115%; }
}

/* ==========================================================================
   LIQUID MORPHING — REFINED
   75% range reduction, hover-activated, golden ratio proportions
   ========================================================================== */

.te-liquid {
  position: relative;
  border-radius: 1px 4px 2px 6px;
  transition: border-radius 800ms cubic-bezier(0.4, 0, 0.2, 1);
}

.te-liquid:hover {
  border-radius: 4px 1px 6px 2px;
}

/* Continuous morphing with golden ratio timing */
.te-liquid-ambient {
  animation: te-liquid-morph 12s ease-in-out infinite;
  animation-play-state: paused;
}

.te-liquid-ambient:hover {
  animation-play-state: running;
}

@keyframes te-liquid-morph {
  0%, 100% { border-radius: 1px 4px 2px 6px / 4px 2px 6px 1px; }
  25% { border-radius: 4px 2px 6px 1px / 2px 6px 1px 4px; }
  50% { border-radius: 2px 6px 1px 4px / 6px 1px 4px 2px; }
  75% { border-radius: 6px 1px 4px 2px / 1px 4px 2px 6px; }
}

/* Shadow accompanies morphing */
.te-liquid-shadow {
  transition: box-shadow 800ms cubic-bezier(0.4, 0, 0.2, 1);
}

.te-liquid-shadow:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* ==========================================================================
   DEPTH-AWARE GRAIN — REFINED
   60% opacity reduction, finer frequency, scroll-responsive
   ========================================================================== */

.te-grain {
  position: relative;
}

.te-grain::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  opacity: var(--grain-opacity, 0.008);
  pointer-events: none;
  mix-blend-mode: soft-light;
  transition: opacity 300ms ease;
}

/* Grain intensity by depth */
.te-grain-1 { --grain-opacity: 0.005; }
.te-grain-2 { --grain-opacity: 0.008; }
.te-grain-3 { --grain-opacity: 0.012; }
.te-grain-4 { --grain-opacity: 0.015; }
.te-grain-5 { --grain-opacity: 0.018; }

/* Grain that settles after scroll */
.te-grain-scroll.is-scrolling::after {
  opacity: calc(var(--grain-opacity, 0.008) * 0.3);
}

/* ==========================================================================
   ATMOSPHERIC PERSPECTIVE — REFINED
   Subtler fade, reduced blur
   ========================================================================== */

.te-atmosphere-1 { opacity: 0.97; }
.te-atmosphere-2 { opacity: 0.94; filter: blur(0.15px); }
.te-atmosphere-3 { opacity: 0.88; filter: blur(0.3px); }
.te-atmosphere-4 { opacity: 0.82; filter: blur(0.5px); }
.te-atmosphere-5 { opacity: 0.75; filter: blur(0.7px); }

/* Container with atmospheric children */
.te-atmospheric > *:nth-child(1) { opacity: 1; }
.te-atmospheric > *:nth-child(2) { opacity: 0.97; }
.te-atmospheric > *:nth-child(3) { opacity: 0.94; filter: blur(0.1px); }
.te-atmospheric > *:nth-child(4) { opacity: 0.90; filter: blur(0.2px); }
.te-atmospheric > *:nth-child(5) { opacity: 0.86; filter: blur(0.3px); }

/* ==========================================================================
   HALO GLOW — REFINED
   Active-only, desaturated, reduced spread
   ========================================================================== */

.te-halo {
  position: relative;
  transition: box-shadow 400ms ease;
}

.te-halo:active {
  box-shadow: 
    0 0 0 1px rgba(255, 107, 53, 0.06),
    0 0 0 3px rgba(255, 107, 53, 0.03);
}

.te-halo-success:active {
  box-shadow: 
    0 0 0 1px rgba(16, 185, 129, 0.06),
    0 0 0 3px rgba(16, 185, 129, 0.03);
}

.te-halo-error:active {
  box-shadow: 
    0 0 0 1px rgba(239, 68, 68, 0.06),
    0 0 0 3px rgba(239, 68, 68, 0.03);
}

/* Subtle pulse for attention (not continuous) */
.te-halo-pulse {
  animation: te-halo-pulse-once 2s ease-out forwards;
}

@keyframes te-halo-pulse-once {
  0% { 
    box-shadow: 
      0 0 0 0 rgba(255, 107, 53, 0.1),
      0 0 0 2px rgba(255, 107, 53, 0.05);
  }
  50% {
    box-shadow: 
      0 0 0 4px rgba(255, 107, 53, 0.03),
      0 0 0 8px rgba(255, 107, 53, 0);
  }
  100% {
    box-shadow: 
      0 0 0 8px rgba(255, 107, 53, 0),
      0 0 0 12px rgba(255, 107, 53, 0);
  }
}

/* ==========================================================================
   POLARIZATION — REFINED
   Subtler shifts, softer edges
   ========================================================================== */

.te-polarize {
  position: relative;
}

.te-polarize::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, 
    rgba(255, 107, 53, 0.015) 0%, 
    transparent 40%, 
    transparent 60%, 
    rgba(59, 130, 246, 0.015) 100%
  );
  pointer-events: none;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 600ms ease;
}

.te-polarize:hover::before {
  opacity: 1;
}

/* ==========================================================================
   COMBINED TE LAYER SYSTEM
   Material → Texture → Edge → Light → Feedback
   ========================================================================== */

.te-material {
  position: relative;
  background: var(--scholar-white);
  transition: transform 200ms ease, box-shadow 200ms ease;
}

/* Layer 1: Surface grain (always present, barely visible) */
.te-material::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  opacity: 0.004;
  pointer-events: none;
  mix-blend-mode: soft-light;
  border-radius: inherit;
}

/* Layer 2: Prismatic edge (hover, 400ms delay) */
.te-material-edge::after {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  bottom: -1px;
  background: linear-gradient(
    135deg,
    rgba(255, 107, 53, 0.05) 0%,
    rgba(255, 170, 0, 0.03) 50%,
    rgba(59, 130, 246, 0.03) 100%
  );
  border-radius: inherit;
  z-index: -1;
  opacity: 0;
  transition: opacity 800ms cubic-bezier(0.4, 0, 0.2, 1);
  transition-delay: 400ms;
}

.te-material-edge:hover::after {
  opacity: 1;
  transition-delay: 0ms;
}

/* Layer 3: Caustics ambient (hover) */
.te-material-caustics {
  --caustics-opacity: 0;
}

.te-material-caustics::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(ellipse 80% 50% at 30% 40%, rgba(255, 170, 0, 0.015) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 70% 60%, rgba(255, 107, 53, 0.01) 0%, transparent 50%);
  opacity: var(--caustics-opacity);
  transition: opacity 600ms ease;
  pointer-events: none;
  mix-blend-mode: overlay;
  border-radius: inherit;
}

.te-material-caustics:hover {
  --caustics-opacity: 1;
}

/* Full TE card */
.te-card {
  background: var(--scholar-white);
  border: 1px solid var(--scholar-steam);
  position: relative;
  transition: transform 200ms ease, box-shadow 400ms ease;
}

.te-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.te-card::before {
  /* Grain layer */
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  opacity: 0.004;
  pointer-events: none;
  mix-blend-mode: soft-light;
}

/* ==========================================================================
   TYPOGRAPHIC MICRO-ADJUSTMENTS
   ========================================================================== */

/* Refined headings with alternate glyphs */
.te-heading {
  font-feature-settings: "ss01" on;
  letter-spacing: -0.01em;
}

/* Small caps for labels */
.te-label {
  font-variant-caps: all-small-caps;
  letter-spacing: 0.02em;
  font-size: 0.9em;
}

/* Tabular numbers for data */
.te-data {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

/* Improved body text spacing */
.te-body {
  line-height: 1.65;
}

/* Code with slightly larger size */
.te-code {
  font-size: 0.9em;
}
/**
 * ScholarCSS Mechanical Paradigm
 * Implementation of 1990s digital aesthetic sensibility
 * Constructed, transparent, constrained, tactile — without skeuomorphism
 */

/* ==========================================================================
   1. CONSTRUCTEDNESS: RIGID GRID SYSTEM
   Everything aligns to visible 4px base unit
   ========================================================================== */

:root {
  /* Mechanical grid base unit */
  --mech-unit: 4px;
  --mech-unit-2: 8px;
  --mech-unit-4: 16px;
  --mech-unit-8: 32px;
  --mech-unit-16: 64px;
  
  /* Discrete spacing scale (not continuous) */
  --mech-space-0: 0;
  --mech-space-1: var(--mech-unit);
  --mech-space-2: var(--mech-unit-2);
  --mech-space-4: var(--mech-unit-4);
  --mech-space-8: var(--mech-unit-8);
  --mech-space-16: var(--mech-unit-16);
}

/* Grid-aligned elements */
.mech-grid {
  display: grid;
  grid-template-columns: repeat(12, calc(var(--mech-unit) * 16));
  gap: var(--mech-unit-4);
}

/* Snap-to-grid positioning */
.mech-snap {
  position: relative;
}

.mech-snap > * {
  position: absolute;
  top: calc(var(--mech-unit) * var(--mech-y, 0));
  left: calc(var(--mech-unit) * var(--mech-x, 0));
  width: calc(var(--mech-unit) * var(--mech-w, 16));
  height: calc(var(--mech-unit) * var(--mech-h, 16));
}

/* Visible grid overlay (construction artifact) */
.mech-construction {
  position: relative;
}

.mech-construction::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(to right, var(--scholar-steam) 1px, transparent 1px),
    linear-gradient(to bottom, var(--scholar-steam) 1px, transparent 1px);
  background-size: var(--mech-unit-4) var(--mech-unit-4);
  pointer-events: none;
  opacity: 0.3;
  z-index: 1000;
}

/* ==========================================================================
   2. TRANSPARENCY OF FUNCTION: BINARY STATE SYSTEM
   Discrete states with visible, instantaneous transitions
   ========================================================================== */

/* Base mechanical button */
.mech-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--mech-space-2) var(--mech-space-4);
  font-family: var(--scholar-font-mono);
  font-size: var(--scholar-text-sm);
  font-weight: var(--scholar-font-medium);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--scholar-graphite);
  background-color: var(--scholar-snow);
  border: 1px solid var(--scholar-steam);
  border-radius: 0;
  cursor: pointer;
  
  /* Binary states: resting or pressed */
  transform: translateY(0);
  box-shadow: 
    0 2px 0 var(--scholar-steam),
    0 3px 0 var(--scholar-fog);
  
  /* Instantaneous transition (no smoothing) */
  transition: none;
}

/* Pressed state: visible displacement */
.mech-btn:active,
.mech-btn.mech-pressed {
  transform: translateY(2px);
  box-shadow: 
    0 0 0 var(--scholar-steam),
    0 1px 0 var(--scholar-fog);
  background-color: var(--scholar-steam);
}

/* Disabled state: visually "locked" */
.mech-btn:disabled,
.mech-btn.mech-locked {
  color: var(--scholar-fog);
  background-color: var(--scholar-snow);
  border-color: var(--scholar-steam);
  box-shadow: none;
  cursor: not-allowed;
  position: relative;
}

.mech-btn:disabled::after,
.mech-btn.mech-locked::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 10%;
  right: 10%;
  height: 2px;
  background-color: var(--scholar-fog);
}

/* Toggle switch with visible binary states */
.mech-toggle {
  position: relative;
  width: calc(var(--mech-unit) * 12);
  height: calc(var(--mech-unit) * 6);
  background-color: var(--scholar-snow);
  border: 1px solid var(--scholar-steam);
  cursor: pointer;
}

.mech-toggle::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: calc(var(--mech-unit) * 5);
  height: calc(var(--mech-unit) * 5 - 4px);
  background-color: var(--scholar-graphite);
  border: 1px solid var(--scholar-ink);
  
  /* Binary positions: left (off) or right (on) */
  transform: translateX(0);
  transition: none;
}

.mech-toggle.mech-on::after {
  transform: translateX(calc(var(--mech-unit) * 6 - 4px));
  background-color: var(--scholar-orange);
  border-color: var(--scholar-ember);
}

/* LED indicator (on/off state visibility) */
.mech-led {
  display: inline-block;
  width: var(--mech-unit-2);
  height: var(--mech-unit-2);
  background-color: var(--scholar-steam);
  border: 1px solid var(--scholar-fog);
}

.mech-led.mech-on {
  background-color: var(--scholar-orange);
  border-color: var(--scholar-ember);
  box-shadow: 0 0 4px var(--scholar-orange);
}

/* ==========================================================================
   3. CONSTRAINED POSSIBILITY SPACE: DISCRETE DESIGN TOKENS
   Limited, countable values instead of continuous ranges
   ========================================================================== */

/* Discrete color palette (16 colors maximum) */
:root {
  --mech-c-0: var(--scholar-white);    /* Background */
  --mech-c-1: var(--scholar-snow);     /* Secondary background */
  --mech-c-2: var(--scholar-steam);    /* Borders, dividers */
  --mech-c-3: var(--mech-fog);         /* Disabled */
  --mech-c-4: var(--scholar-slate);    /* Secondary text */
  --mech-c-5: var(--scholar-graphite); /* Primary text */
  --mech-c-6: var(--scholar-ink);      /* Headings */
  --mech-c-7: var(--scholar-void);     /* Deep accents */
  --mech-c-8: var(--scholar-orange);   /* Primary accent */
  --mech-c-9: var(--scholar-coral);    /* Hover accent */
  --mech-c-10: var(--scholar-ember);   /* Active accent */
  --mech-c-11: var(--scholar-success); /* Success */
  --mech-c-12: var(--scholar-warning); /* Warning */
  --mech-c-13: var(--scholar-error);   /* Error */
  --mech-c-14: var(--scholar-info);    /* Info */
  --mech-c-15: transparent;            /* Transparent */
}

/* Discrete type scale (8 sizes) */
.mech-text-xs { font-size: 10px; }
.mech-text-sm { font-size: 12px; }
.mech-text-md { font-size: 14px; }
.mech-text-lg { font-size: 16px; }
.mech-text-xl { font-size: 20px; }
.mech-text-2x { font-size: 24px; }
.mech-text-4x { font-size: 32px; }
.mech-text-8x { font-size: 48px; }

/* Fixed-width constraints */
.mech-w-fixed {
  width: calc(var(--mech-unit) * 64);  /* 256px */
}

.mech-w-screen {
  width: calc(var(--mech-unit) * 80);  /* 320px */
}

.mech-w-page {
  width: calc(var(--mech-unit) * 160); /* 640px */
}

/* Pixel-perfect alignment utilities */
.mech-align-4 { margin-left: calc(var(--mech-unit) * 1); }
.mech-align-8 { margin-left: calc(var(--mech-unit) * 2); }
.mech-align-16 { margin-left: calc(var(--mech-unit) * 4); }
.mech-align-32 { margin-left: calc(var(--mech-unit) * 8); }

/* ==========================================================================
   4. PHYSICALITY WITHOUT MIMICRY: TACTILE INTERACTION SYSTEM
   Weight, resistance, and response without literal textures
   ========================================================================== */

/* Element weight (visual mass) */
.mech-weight-1 { 
  box-shadow: 0 1px 0 var(--scholar-steam);
}

.mech-weight-2 { 
  box-shadow: 
    0 1px 0 var(--scholar-steam),
    0 2px 0 var(--scholar-fog);
}

.mech-weight-3 { 
  box-shadow: 
    0 1px 0 var(--scholar-steam),
    0 2px 0 var(--scholar-fog),
    0 3px 0 var(--scholar-slate);
}

/* Resistance (requires "effort" to interact) */
.mech-resist {
  cursor: grab;
  user-select: none;
}

.mech-resist:active {
  cursor: grabbing;
}

.mech-resist.mech-dragging {
  opacity: 0.7;
  cursor: grabbing;
}

/* Inertia (momentum-based movement) */
.mech-inertia {
  transition: transform 50ms steps(4);
}

/* Detent (clicking into discrete positions) */
.mech-detent {
  scroll-snap-type: y mandatory;
}

.mech-detent > * {
  scroll-snap-align: start;
  height: calc(var(--mech-unit) * 16);
}

/* Surface texture (abstract, not literal) */
.mech-texture {
  position: relative;
}

.mech-texture::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='4' height='4' viewBox='0 0 4 4' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h1v1H0zM2 2h1v1H2z' fill='%23000' fill-opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
}

/* ==========================================================================
   5. MODULAR COMPOSITION: INTERCHANGEABLE COMPONENTS
   Discrete units that fit together through visible joints
   ========================================================================== */

/* Base module */
.mech-module {
  position: relative;
  padding: var(--mech-space-4);
  background-color: var(--scholar-white);
  border: 1px solid var(--scholar-steam);
  
  /* Visible joint on right/bottom */
  margin-right: 1px;
  margin-bottom: 1px;
}

.mech-module::after {
  content: '';
  position: absolute;
  right: -2px;
  top: var(--mech-space-2);
  bottom: var(--mech-space-2);
  width: 1px;
  background-color: var(--scholar-fog);
}

.mech-module::before {
  content: '';
  position: absolute;
  bottom: -2px;
  left: var(--mech-space-2);
  right: var(--mech-space-2);
  height: 1px;
  background-color: var(--scholar-fog);
}

/* Module sizes (discrete) */
.mech-module-sm { padding: var(--mech-space-2); }
.mech-module-lg { padding: var(--mech-space-8); }

/* Module states */
.mech-module.mech-active {
  background-color: var(--scholar-snow);
  border-color: var(--scholar-orange);
}

.mech-module.mech-selected {
  outline: 2px solid var(--scholar-orange);
  outline-offset: -2px;
}

/* Assembly (modules connected) */
.mech-assembly {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  padding: var(--mech-space-2);
  background-color: var(--scholar-snow);
  border: 1px solid var(--scholar-steam);
}

.mech-assembly .mech-module {
  margin: 0;
  flex: 0 0 auto;
}

/* Panel (container with visible frame) */
.mech-panel {
  padding: var(--mech-space-4);
  background-color: var(--scholar-snow);
  border: 2px solid var(--scholar-steam);
  border-radius: 0;
}

.mech-panel-header {
  margin: calc(var(--mech-space-4) * -1);
  margin-bottom: var(--mech-space-4);
  padding: var(--mech-space-2) var(--mech-space-4);
  background-color: var(--scholar-steam);
  font-family: var(--scholar-font-mono);
  font-size: var(--scholar-text-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ==========================================================================
   6. CONSTRUCTION STATES: PROGRESSIVE DISCLOSURE
   Interfaces that build themselves visibly
   ========================================================================== */

/* Skeleton showing structure before content */
.mech-skeleton {
  position: relative;
  background-color: var(--scholar-snow);
  border: 1px solid var(--scholar-steam);
}

.mech-skeleton::before {
  content: '';
  position: absolute;
  top: var(--mech-space-2);
  left: var(--mech-space-4);
  right: var(--mech-space-4);
  height: var(--mech-space-2);
  background-color: var(--scholar-steam);
}

.mech-skeleton::after {
  content: '';
  position: absolute;
  top: var(--mech-space-8);
  left: var(--mech-space-4);
  right: 30%;
  height: var(--mech-space-2);
  background-color: var(--scholar-steam);
}

/* Building animation (stepwise, not smooth) */
@keyframes mech-build {
  0% { opacity: 0; }
  25% { opacity: 0.3; }
  50% { opacity: 0.6; }
  75% { opacity: 0.8; }
  100% { opacity: 1; }
}

.mech-building {
  animation: mech-build 200ms steps(4) forwards;
}

/* Line-by-line reveal (like progressive JPEG) */
.mech-reveal-line {
  clip-path: inset(0 0 100% 0);
  animation: mech-reveal 100ms steps(2) forwards;
}

@keyframes mech-reveal {
  to { clip-path: inset(0 0 0 0); }
}

/* ==========================================================================
   7. MATERIAL HONESTY: DIGITAL AS DIGITAL
   Celebrating constraints rather than hiding them
   ========================================================================== */

/* Pixel grid visibility */
.mech-pixel {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

/* Banding as feature (limited color steps) */
.mech-banded {
  background: linear-gradient(
    to bottom,
    var(--scholar-snow) 0%,
    var(--scholar-snow) 20%,
    var(--scholar-steam) 20%,
    var(--scholar-steam) 40%,
    var(--scholar-snow) 40%,
    var(--scholar-snow) 60%,
    var(--scholar-steam) 60%,
    var(--scholar-steam) 80%,
    var(--scholar-snow) 80%,
    var(--scholar-snow) 100%
  );
}

/* Visible scanlines */
.mech-scanlines {
  position: relative;
}

.mech-scanlines::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 1px,
    rgba(0, 0, 0, 0.03) 1px,
    rgba(0, 0, 0, 0.03) 2px
  );
  pointer-events: none;
}

/* Resolution indicator */
.mech-resolution::before {
  content: attr(data-res);
  position: absolute;
  top: 2px;
  right: 4px;
  font-family: var(--scholar-font-mono);
  font-size: 9px;
  color: var(--scholar-fog);
  pointer-events: none;
}

/* ==========================================================================
   8. COMBINED MECHANICAL COMPONENTS
   Pre-assembled patterns following the mechanical paradigm
   ========================================================================== */

/* Mechanical interface kit */
.mech-kit {
  display: grid;
  grid-template-columns: repeat(4, calc(var(--mech-unit) * 16));
  grid-template-rows: repeat(4, calc(var(--mech-unit) * 16));
  gap: var(--mech-space-2);
  padding: var(--mech-space-4);
  background-color: var(--scholar-snow);
  border: 2px solid var(--scholar-steam);
}

/* Control surface (OP-1 inspired) */
.mech-surface {
  display: flex;
  flex-direction: column;
  gap: var(--mech-space-2);
  padding: var(--mech-space-4);
  background-color: var(--scholar-ink);
}

.mech-surface-display {
  height: calc(var(--mech-unit) * 24);
  background-color: var(--scholar-cream);
  border: 2px inset var(--scholar-steam);
  padding: var(--mech-space-2);
  font-family: var(--scholar-font-mono);
  font-size: var(--scholar-text-sm);
}

.mech-surface-controls {
  display: flex;
  gap: var(--mech-space-2);
}

.mech-surface-btn {
  flex: 1;
  height: calc(var(--mech-unit) * 10);
  background-color: var(--scholar-graphite);
  border: 1px solid var(--scholar-slate);
  color: var(--scholar-white);
  font-family: var(--scholar-font-mono);
  font-size: var(--scholar-text-xs);
  text-transform: uppercase;
  cursor: pointer;
}

.mech-surface-btn:active {
  background-color: var(--scholar-orange);
  border-color: var(--scholar-ember);
}

/* Tape deck metaphor (abstracted) */
.mech-deck {
  position: relative;
  padding: var(--mech-space-8);
  background-color: var(--scholar-snow);
  border: 3px solid var(--scholar-steam);
}

.mech-deck-window {
  height: calc(var(--mech-unit) * 12);
  background-color: var(--scholar-white);
  border: 2px inset var(--scholar-steam);
  margin-bottom: var(--mech-space-4);
  overflow: hidden;
  position: relative;
}

.mech-deck-spool {
  position: absolute;
  width: calc(var(--mech-unit) * 8);
  height: calc(var(--mech-unit) * 8);
  border: 4px solid var(--scholar-graphite);
  border-radius: 50%;
  top: 50%;
  transform: translateY(-50%);
}

.mech-deck-spool:first-child { left: var(--mech-space-4); }
.mech-deck-spool:last-child { right: var(--mech-space-4); }

.mech-deck-controls {
  display: flex;
  justify-content: center;
  gap: var(--mech-space-2);
}

.mech-deck-btn {
  width: calc(var(--mech-unit) * 10);
  height: calc(var(--mech-unit) * 8);
  background-color: var(--scholar-graphite);
  border: none;
  color: var(--scholar-white);
  font-family: var(--scholar-font-mono);
  font-size: 10px;
  cursor: pointer;
}

.mech-deck-btn:active {
  background-color: var(--scholar-orange);
}
