/* =========================================================
   PORTFOLIO · THEME SYSTEM (Dark/Light/High-Contrast)
   ========================================================= */

:root {
  --radius-xl: 18px;
  --radius-lg: 14px;
  --radius-md: 10px;
  --container: clamp(320px, 92vw, 1180px);
  --header-h: 92px;

  /* dark palette (default) */
  --bg: #0e0f14;
  --bg-soft: #151821;
  --card: #121420;
  --text: #e6e9f2;
  --muted: #9aa3b2;
  --border: rgba(255, 255, 255, .08);
  --shadow: 0 12px 30px rgba(0, 0, 0, .45);

  --accent: #6b5cff;
  --accent-2: #9a89ff;
  --accent-3: #b7a9ff;

  --glow: 0 10px 26px rgba(154, 137, 255, .20), 0 0 0 1px rgba(154, 137, 255, .22) inset;
  --glow-soft: 0 10px 24px rgba(154, 137, 255, .14);
}

html[data-theme="light"] {
  --bg: #f8f7f4;
  --bg-soft: #ffffff;
  --card: #ffffff;
  --text: #2d2f3a;
  --muted: #6b7280;
  --border: rgba(0, 0, 0, .06);
  --shadow: 0 4px 12px rgba(0, 0, 0, .04);
  --accent: #6366f1;
  --accent-2: #818cf8;
  --accent-3: #a5b4fc;
  --glow: 0 4px 14px rgba(99, 102, 241, .12), 0 0 0 1px rgba(99, 102, 241, .08) inset;
  --glow-soft: 0 4px 10px rgba(99, 102, 241, .08);
}

html[data-theme="hc"] {
  --bg: #0a0a0a;
  --bg-soft: #0f0f10;
  --card: #0b0c0f;
  --text: #ffffff;
  --muted: #cfd3da;
  --border: #ffffff33;
  --shadow: 0 0 0 rgba(0, 0, 0, 0);
  --accent: #4c82ff;
  --accent-2: #7aa5ff;
  --accent-3: #a9c2ff;
  --glow: 0 0 0 2px #7aa5ff55, 0 0 0 1px #7aa5ff88 inset;
  --glow-soft: 0 0 0 2px #7aa5ff55;
}

* {
  box-sizing: border-box
}

html,
body {
  margin: 0;
  height: 100%
}

body {
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  padding-top: calc(var(--header-h) + 12px);
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
}

a {
  color: inherit;
  text-decoration: none
}

img {
  max-width: 100%;
  display: block
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px
}

/* NAV (Island) */
.nav {
  position: fixed;
  top: 12px;
  left: 0;
  right: 0;
  z-index: 1000;
  pointer-events: none
}

.nav-inner {
  display: flex;
  justify-content: center;
  align-items: center
}

.island {
  pointer-events: auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  width: min(980px, 92%);
  background: rgba(18, 20, 32, .65);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 10px 14px;
  box-shadow: var(--shadow);
  transition: all .28s ease;
  backdrop-filter: blur(10px);
}

.island:hover {
  transform: translateY(-2px)
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  min-width: 0
}

.brand .logo {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: conic-gradient(from 220deg at 50% 50%, var(--accent), var(--accent-2));
  box-shadow: var(--shadow)
}

.brand .label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

/* Language Switcher */
.nav-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.lang-switch {
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--border);
}

.lang-btn {
  padding: 5px 8px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  background: transparent;
  border: none;
  transition: all .2s ease;
  text-decoration: none;
}

.lang-btn:hover {
  color: var(--text);
}

.lang-btn.active {
  background: var(--accent);
  color: #fff;
}

/* Theme Toggle */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all .2s ease;
  font-size: 13px;
}

.theme-toggle:hover {
  color: var(--text);
  background: rgba(255, 255, 255, .05);
}

.theme-toggle span {
  display: none;
}

/* Mobile Controls */
.mobile-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.lang-switch-mobile {
  display: flex;
  gap: 2px;
  padding: 4px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--border);
}

.lang-switch-mobile .lang-btn {
  padding: 10px 16px;
  font-size: 13px;
  border-radius: 9px;
}

.mobile-controls .theme-toggle {
  width: auto;
  height: auto;
  padding: 10px 16px;
  border-radius: 12px;
}

.mobile-controls .theme-toggle span {
  display: inline;
  font-size: 13px;
  font-weight: 500;
}

@media (max-width: 991px) {
  .nav-controls {
    display: none;
  }
}

/* Light theme adjustments */
html[data-theme="light"] .lang-switch,
html[data-theme="light"] .lang-switch-mobile {
  background: rgba(0, 0, 0, .04);
}

html[data-theme="light"] .theme-toggle:hover {
  background: rgba(0, 0, 0, .04);
}

/* Note: Mobile Controls defined above in lines 218-258 */

.nav-links {
  position: relative;
  display: flex;
  gap: 8px;
  justify-self: end;
  align-items: center
}

.nav-links a {
  position: relative;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--muted);
  transition: .25s;
  white-space: nowrap
}

.nav-links a:hover {
  color: var(--text)
}

.nav-links a.active {
  color: var(--text)
}

.nav-indicator {
  position: absolute;
  bottom: 6px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  transition: transform .35s cubic-bezier(.2, .8, .2, 1), width .35s cubic-bezier(.2, .8, .2, 1);
  will-change: transform, width
}

.burger {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 12px;
  padding: 16px 16px;
  min-width: 44px;
  min-height: 44px
}

@media (min-width:992px) {
  .nav {
    pointer-events: none
  }

  .island {
    pointer-events: auto
  }

  .nav-links {
    display: flex
  }

  .burger {
    display: none
  }

  .nav.compact .island {
    width: clamp(260px, 40vw, 560px);
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
  }

  .nav.compact .brand .label {
    opacity: .9;
    max-width: 240px
  }

  .nav.compact .brand .logo {
    width: 30px;
    height: 30px
  }

  .nav.compact .nav-links a {
    padding: 8px;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    font-size: 18px;
    border-radius: 999px;
  }

  .nav.compact .nav-indicator {
    bottom: 4px;
    height: 3px
  }

  .nav.compact .nav-controls {
    display: none;
  }

  .theme-fab {
    display: none;
  }
}

@media (max-width:991px) {
  .nav-links {
    display: none
  }

  .burger {
    display: inline-flex;
    justify-self: end
  }

  .theme-fab {
    display: none;
  }
}

/* Backdrop & Mobile Panel */
.backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .44);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
  z-index: 999
}

.backdrop.show {
  opacity: 1;
  pointer-events: auto
}

.mobile-panel {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  height: 100dvh;
  z-index: 1001;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 16px;
  background: rgba(18, 20, 32, .98);
  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 20px;
  border: 1px solid var(--border);
  transform: translateY(-102%);
  opacity: 0;
  pointer-events: none;
  transition: transform .32s cubic-bezier(.2, .8, .2, 1), opacity .25s ease;
}

.mobile-panel.show {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto
}

.mobile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border)
}

.mobile-head .brand {
  gap: 10px
}

.mobile-head .logo {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: conic-gradient(from 220deg at 50% 50%, var(--accent), var(--accent-2))
}

.mobile-links {
  padding: 10px 8px 18px;
  overflow: auto
}

.mobile-links a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  margin: 6px 8px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #171a260f;
  transition: transform .2s, box-shadow .2s
}

.mobile-links a:hover {
  transform: translateY(-2px);
  box-shadow: var(--glow-soft)
}

.mobile-foot {
  padding: 12px 16px 18px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 12px;
  justify-content: space-between
}

/* Buttons */
.btn {
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text);
  font-weight: 600;
  transition: transform .2s, box-shadow .2s, filter .2s;
  cursor: pointer;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: var(--glow-soft);
  filter: saturate(1.05)
}

.btn:active {
  transform: translateY(-1px)
}

.btn.primary {
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  border-color: transparent;
  color: #0a0a0a;
}

.btn.ghost {
  background: transparent;
  border-color: var(--border)
}

/* Hero */
.hero {
  padding: 54px 0 54px;
  position: relative
}

.hero-wrap {
  min-height: 40em;
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 32px;
  align-items: center
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(154, 137, 255, .16);
  border: 1px solid rgba(154, 137, 255, .28)
}

.badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
  position: relative
}

.badge .dot::before,
.badge .dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: var(--accent);
  animation: dotRipple 2s ease-out infinite
}

.badge .dot::after {
  animation-delay: 1s
}

@keyframes dotRipple {
  0% {
    transform: scale(1);
    opacity: 0.6;
  }

  100% {
    transform: scale(3.5);
    opacity: 0;
  }
}

h1,
h2,
h3,
h4 {
  font-family: 'Sora', 'Inter', system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  transition: transform .25s ease
}

h1:hover,
h2:hover,
h3:hover,
h4:hover {
  transform: translateX(4px)
}

h1 {
  font-size: clamp(28px, 6.2vw, 46px);
  line-height: 1.07;
  margin: 14px 0 12px;
  letter-spacing: -0.03em;
  font-weight: 800;
  word-wrap: break-word
}

.sub {
  color: var(--muted);
  font-size: clamp(16px, 3.8vw, 18px);
  max-width: 60ch
}

.hero-card {
  padding: 20px;
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(107, 92, 255, .10), rgba(18, 20, 32, .66));
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden
}

.hero-card:hover {
  border-color: rgba(154, 137, 255, .35)
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: -20%;
  background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, .18) 20%, transparent 40%);
  transform: translateX(-120%);
  opacity: .22;
  pointer-events: none
}

.hero-card:hover::after {
  animation: sweep 1.4s ease
}

@keyframes sweep {
  to {
    transform: translateX(120%);
  }
}

.hero-card pre {
  margin: 0;
  font-family: 'JetBrains Mono', 'Fira Code', 'SF Mono', Consolas, monospace;
  font-size: 13px;
  line-height: 1.7;
  color: #e3e7f8;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-feature-settings: 'liga' 1, 'calt' 1;
}

.caret {
  display: inline-block;
  width: 10px;
  background: currentColor;
  margin-left: 2px;
  animation: blink 1s steps(1, end) infinite
}

@keyframes blink {
  50% {
    opacity: 0
  }
}

/* Sections / Cards / Tags */
section {
  padding: 68px 0
}

.sec-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 12px;
  flex-wrap: wrap
}

.sec-head h2 {
  font-size: 28px;
  margin: 0
}

.muted {
  color: var(--muted)
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px
}

.card {
  background: linear-gradient(180deg, rgba(26, 28, 42, .94), rgba(18, 20, 32, .94));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s, filter .2s
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--glow);
  filter: saturate(1.04)
}

.card h3 {
  margin: 8px 0 6px;
  font-size: 18px
}

.card p {
  margin: 0;
  color: var(--muted)
}

.card .meta {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap
}

.card .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 999px;
  background: #171a26;
  border: 1px solid var(--border);
  color: #e4e7ff;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tag i {
  opacity: .9
}

.chips,
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px
}

.chip {
  padding: 8px 12px;
  border-radius: 999px;
  background: #171a26;
  border: 1px solid var(--border);
  color: #e4e7ff;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 500;
  transition: transform .2s, box-shadow .2s;
  margin: 0
}

.chip:hover {
  transform: translateY(-4px);
  box-shadow: var(--glow-soft)
}

/* Filters */
.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap
}

.filters button {
  all: unset;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  color: var(--muted);
  background: var(--bg-soft);
  transition: transform .2s, box-shadow .2s;
}

.filters button:hover {
  transform: translateY(-2px)
}

.filters button.active {
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: #fff;
  border-color: transparent
}

/* Grid / Timeline */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px
}

.timeline {
  position: relative;
  padding-left: 24px
}

.timeline::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(var(--accent-2), var(--accent))
}

.t-item {
  position: relative;
  margin: 0 0 16px 0;
  padding: 0.5px 8px 4px 14px;
  border-radius: 8px;
  transition: transform .2s ease, background .2s ease
}

.t-item::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 18px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent-2);
  box-shadow: 0 0 0 4px rgba(125, 60, 255, .18)
}

/* Pulsowanie dla najnowszego elementu - główna kropka zostaje, tylko fale się rozchodzą */
.t-item:first-child::before {
  box-shadow: 0 0 0 4px rgba(125, 60, 255, .18);
  animation: timelineRipple 2s ease-out infinite
}

@keyframes timelineRipple {
  0% {
    box-shadow: 0 0 0 0 rgba(154, 137, 255, .5);
  }

  70% {
    box-shadow: 0 0 0 12px rgba(154, 137, 255, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(154, 137, 255, 0);
  }
}

.t-item:hover {
  transform: translateX(6px);
  background: rgba(107, 92, 255, .06)
}

/* Contact / Forms */
.contact {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 22px
}

label {
  font-size: 13px;
  color: var(--muted)
}

input,
textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #0f111a;
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 14px;
  transition: box-shadow .2s, transform .2s
}

input:hover,
textarea:hover {
  transform: translateY(-2px)
}

input:focus,
textarea:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(125, 60, 255, .3), 0 0 0 6px rgba(125, 60, 255, .12)
}

textarea {
  min-height: 140px;
  resize: vertical
}

/* Footer */
footer {
  padding: 28px 0;
  border-top: 1px solid var(--border);
  color: var(--muted)
}

/* Background Orbs */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--bg)
}

.bg::before {
  content: "";
  position: absolute;
  inset: 0;

}

.bg::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .12;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1600' height='900' viewBox='0 0 1600 900'%3E%3Cg fill='none' stroke='%239a89ff' stroke-width='1' stroke-linecap='round'%3E%3Cpath d='M0 120 H200 L280 200 H400' stroke-opacity='0.5'/%3E%3Cpath d='M0 340 H120 L180 280 H320' stroke-opacity='0.4'/%3E%3Cpath d='M1600 140 H1400 L1320 220 H1200' stroke-opacity='0.5'/%3E%3Cpath d='M1600 360 H1480 L1420 300 H1280' stroke-opacity='0.4'/%3E%3Cpath d='M0 560 H180 L260 640 H380' stroke-opacity='0.4'/%3E%3Cpath d='M0 780 H140 L200 720 H340' stroke-opacity='0.5'/%3E%3Cpath d='M1600 540 H1420 L1340 620 H1220' stroke-opacity='0.4'/%3E%3Cpath d='M1600 760 H1460 L1400 700 H1260' stroke-opacity='0.5'/%3E%3Ccircle cx='400' cy='200' r='2.5' fill='%239a89ff' fill-opacity='0.6'/%3E%3Ccircle cx='320' cy='280' r='2' fill='%239a89ff' fill-opacity='0.5'/%3E%3Ccircle cx='1200' cy='220' r='2.5' fill='%239a89ff' fill-opacity='0.6'/%3E%3Ccircle cx='1280' cy='300' r='2' fill='%239a89ff' fill-opacity='0.5'/%3E%3Ccircle cx='380' cy='640' r='2.5' fill='%239a89ff' fill-opacity='0.5'/%3E%3Ccircle cx='1220' cy='620' r='2.5' fill='%239a89ff' fill-opacity='0.5'/%3E%3C/g%3E%3C/svg%3E");
  background-size: cover;
  background-position: center
}

/* Responsive */
@media (min-width:641px) and (max-width:980px) {
  .container {
    max-width: 900px
  }

  .island {
    width: min(860px, 94%)
  }

  .hero-wrap {
    min-height: 40em;
    grid-template-columns: 1fr 1fr;
    gap: 22px
  }

  .cards {
    grid-template-columns: repeat(2, 1fr)
  }

  .grid-2 {
    grid-template-columns: 1fr 1fr
  }

  .contact {
    grid-template-columns: 1fr 1fr
  }
}

@media (max-width:640px) {
  .island {
    width: 94%;
    padding: 8px 10px;
    border-radius: 22px
  }

  .hero {
    padding-top: 78px
  }

  .hero-wrap {
    min-height: 40em;
    grid-template-columns: 1fr
  }

  .cta-row {
    flex-direction: column
  }

  .cta-row .btn {
    width: 100%;
    justify-content: center
  }

  .cards {
    grid-template-columns: 1fr
  }

  .grid-2 {
    grid-template-columns: 1fr
  }

  .contact {
    grid-template-columns: 1fr
  }

  h1 {
    font-size: clamp(26px, 7.2vw, 34px)
  }

  .card {
    padding: 16px
  }

  input,
  textarea {
    font-size: 16px
  }

  .sec-head {
    flex-direction: column;
    align-items: start
  }
}

/* Floaters */
.floaters {
  position: absolute;
  inset: 0;
  pointer-events: none
}

.floaters .f {
  position: absolute;
  opacity: .16;
  font-size: 22px;
  background: rgba(125, 60, 255, .12);
  border: 1px solid rgba(125, 60, 255, .25);
  padding: 8px 10px;
  border-radius: 12px;
  box-shadow: var(--shadow)
}

.floaters .f:nth-child(1) {
  left: 6%;
  top: 10%
}

.floaters .f:nth-child(2) {
  left: 20%;
  top: 38%
}

.floaters .f:nth-child(3) {
  left: 48%;
  top: 16%
}

.floaters .f:nth-child(4) {
  left: 14%;
  top: 66%
}

.floaters .f:nth-child(5) {
  left: 70%;
  top: 40%
}

/* Helpers */
.cta-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 12px
}

.note {
  font-size: 12px;
  color: var(--muted)
}

/* Theme FAB */
.theme-fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1100;
  border: none;
  border-radius: 999px;
  padding: 14px 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .25);
  transition: filter .2s, transform .2s;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: #000;
}

.theme-fab:hover {
  filter: saturate(1.05);
  transform: translateY(-2px)
}

/* Theme Transition */
@media (prefers-reduced-motion: no-preference) {

  html.theme-xfade,
  html.theme-xfade * {
    transition:
      background-color .45s ease,
      color .45s ease,
      border-color .45s ease,
      box-shadow .45s ease !important;
  }
}

/* Light Overrides */
html[data-theme="light"] .island {
  background: rgba(255, 255, 255, .85);
}

html[data-theme="light"] .mobile-panel {
  background: #ffffff;
}

html[data-theme="light"] .hero-card {
  background: #ffffff;
  border-color: var(--border);
}

html[data-theme="light"] .hero-card pre {
  color: #374151;
}

html[data-theme="light"] .card {
  background: #ffffff;
}

html[data-theme="light"] .tag,
html[data-theme="light"] .chip {
  background: #f3f4f6;
  border-color: rgba(0, 0, 0, .06);
  color: #374151;
}

html[data-theme="light"] input,
html[data-theme="light"] textarea {
  background: #ffffff;
  border-color: rgba(0, 0, 0, .08);
  color: #2d2f3a;
}

html[data-theme="light"] input:focus,
html[data-theme="light"] textarea:focus {
  box-shadow: 0 0 0 2px rgba(99, 102, 241, .2), 0 0 0 4px rgba(99, 102, 241, .08);
}

html[data-theme="light"] .bg {
  background: #f8f7f4;
}

html[data-theme="light"] .bg::before {
  background:
    radial-gradient(1200px 800px at 85% -10%, rgba(99, 102, 241, .06), transparent 60%),
    radial-gradient(900px 700px at -10% 20%, rgba(129, 140, 248, .06), transparent 60%);
}

html[data-theme="light"] .filters button {
  background: #ffffff;
}

html[data-theme="light"] .btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #ffffff;
}

/* High Contrast Overrides */
html[data-theme="hc"] .island {
  background: #0f0f10;
  border-color: #ffffff33;
}

html[data-theme="hc"] .card {
  background: #0b0c0f;
  border: 2px solid #ffffff44;
}

html[data-theme="hc"] .btn {
  border: 2px solid #ffffff66;
}

html[data-theme="hc"] .hero-card {
  background: #0b0c0f;
  border: 2px solid #ffffff44;
}

html[data-theme="hc"] .bg {
  background: #0a0a0a;
}

html[data-theme="hc"] *:focus {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* === SCROLL UTILS === */
.scroll-wrapper {
  position: relative;
}

.scroll-view {
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 6px;
  padding-bottom: 2px;
}

/* Custom Scrollbar */
.scroll-view::-webkit-scrollbar {
  width: 6px;
}

.scroll-view::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 4px;
}

.scroll-view::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

.scroll-view::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}

/* Scroll Bottom Mask */
.scroll-mask {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(to bottom, transparent, var(--bg));
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 2;
}

.scroll-mask.visible {
  opacity: 1;
}

/* Limits */
.scroll-limit-experience {
  max-height: 400px;
  /* Approx 3.5 items */
}