/* ==========================================================================
   REDESIGN v2 — Light Editorial / Gallery Aesthetic
   ─────────────────────────────────────────────────
   Direction:  Light-by-default, whitespace-driven, magazine editorial.
               The HUD/telemetry chrome becomes nearly invisible.
               Content breathes. Photography takes center stage.
   Palette:    Warm off-whites, charcoal text, muted olive green accent.
   Fonts:      Inter (body), DM Sans (headings), JetBrains Mono (mono).
   Corners:    0px everywhere (inherited from original).
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CORE VARIABLES — light-first warm neutrals
   -------------------------------------------------------------------------- */
:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-condensed: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Consolas', monospace;

  /* Warm off-white surfaces */
  --bg-deep: #f7f6f3;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-card-elevated: #f2f1ee;
  --bg-card-hover: #eae9e5;

  /* Charcoal text hierarchy */
  --text-primary: #1c1c1a;
  --text-secondary: #555550;
  --text-muted: #918e86;

  /* Single olive accent — earthy, desaturated */
  --olive: #5c6e35;
  --olive-rgb: 92, 110, 53;

  /* Replace orange with a quiet warm gray */
  --orange: #918e86;
  --orange-rgb: 145, 142, 134;

  /* Borders */
  --border-subtle: rgba(28, 28, 26, 0.07);
  --border-medium: rgba(28, 28, 26, 0.14);
  --border-olive: rgba(92, 110, 53, 0.3);
  --border-orange: rgba(145, 142, 134, 0.3);
  --glass-bg: rgba(247, 246, 243, 0.92);
  --glass-blur: blur(20px);

  /* Soft shadows — barely there */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 28px rgba(0, 0, 0, 0.08);
  --glow-olive: none;
  --glow-orange: none;
}

/* --------------------------------------------------------------------------
   2. GLOBAL — warm, airy foundation
   -------------------------------------------------------------------------- */
html {
  font-size: 15px;
  line-height: 1.7;
  background-color: var(--bg-deep);
  color: var(--text-primary);
}

body {
  background-color: var(--bg-deep);
  color: var(--text-primary);
}

/* Kill the film-grain overlay entirely */
.cinema-noise {
  display: none !important;
}

/* Remove the ambient color blobs */
body::before,
body::after {
  display: none !important;
}

/* Links — subtle, no harsh color changes */
a {
  color: inherit;
}

/* Headings — clean sans-serif, no more condensed blocky type */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-condensed);
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

img {
  filter: none;
}

/* --------------------------------------------------------------------------
   3. SCROLL PROGRESS — thin olive line
   -------------------------------------------------------------------------- */
#scrollProgress {
  height: 2px;
  background: var(--olive);
  box-shadow: none;
}

/* --------------------------------------------------------------------------
   4. TOP HUD BAR — minimal top strip
   -------------------------------------------------------------------------- */
.top-hud-bar {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-muted);
}

.hud-badge {
  color: var(--text-muted);
}

.hud-dot {
  background: var(--olive);
  box-shadow: none;
}

.hud-clock {
  color: var(--text-muted);
  font-weight: 400;
}

.hud-coords {
  color: var(--text-muted);
}

/* HUD buttons — ghost style */
.hud-ctrl-btn {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
}

.hud-ctrl-btn:hover {
  background: var(--olive);
  color: #fff;
  border-color: var(--olive);
  box-shadow: none;
}

.hud-ctrl-btn::after {
  background: var(--text-primary);
  color: #fff;
  border: 1px solid var(--text-primary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

/* --------------------------------------------------------------------------
   5. NAVIGATION — clean white bar
   -------------------------------------------------------------------------- */
.top-nav {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
}

.nav-logo {
  filter: brightness(0);
  opacity: 0.85;
}

.nav-logo-link:hover .nav-logo {
  filter: brightness(0);
  opacity: 1;
  transform: none;
}

.nav-item {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 13.5px;
  letter-spacing: 0.06em;
}

.nav-item-idx {
  color: var(--text-muted);
  opacity: 0.5;
  font-size: 10px;
}

.nav-item:hover {
  color: var(--text-primary);
  background: rgba(28, 28, 26, 0.03);
}

.nav-item.active {
  color: var(--olive);
  background: rgba(92, 110, 53, 0.07);
}

.nav-item.active .nav-item-idx {
  color: var(--olive);
  opacity: 0.6;
}

/* --------------------------------------------------------------------------
   6. HERO — light overlay, content-forward
   -------------------------------------------------------------------------- */
.hero {
  background-attachment: fixed;
}

.hero-overlay {
  background: radial-gradient(
    ellipse at center,
    rgba(247, 246, 243, 0.82) 0%,
    rgba(247, 246, 243, 0.96) 75%
  ) !important;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.hero-logo {
  filter: brightness(0) !important;
  opacity: 0.8;
  max-width: 340px;
}

.hero-logo:hover {
  opacity: 0.95;
  transform: none;
}

.hero-subtitle {
  color: var(--text-primary) !important;
  font-weight: 600;
  font-size: clamp(18px, 2.6vw, 26px);
  letter-spacing: 0.04em;
}

.hero-bio {
  color: var(--text-secondary) !important;
  font-size: 15px;
  line-height: 1.85;
  max-width: 640px;
  font-weight: 400;
}

/* Hero buttons — outlined, ghost-style */
.hero-btn {
  background: #fff;
  border: 1px solid var(--border-medium);
  color: var(--text-primary) !important;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.06em;
  padding: 8px 16px;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: var(--shadow-sm);
}

.hero-btn .btn-idx {
  color: var(--text-muted);
  font-size: 9px;
}

.hero-btn .btn-glyph {
  color: var(--text-muted);
}

.hero-btn:hover {
  background: var(--olive);
  border-color: var(--olive);
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(92, 110, 53, 0.2);
}

.hero-btn:hover .btn-idx,
.hero-btn:hover .btn-glyph {
  color: rgba(255, 255, 255, 0.7);
}

.hero-btn-accent {
  background: var(--olive);
  border-color: var(--olive);
  color: #fff !important;
}

.hero-btn-accent .btn-idx {
  color: rgba(255, 255, 255, 0.6);
}

.hero-btn-accent .btn-glyph {
  color: rgba(255, 255, 255, 0.6);
}

.hero-btn-accent:hover {
  background: #4a5a2b;
  border-color: #4a5a2b;
  box-shadow: 0 4px 16px rgba(92, 110, 53, 0.3);
}

/* --------------------------------------------------------------------------
   7. BUTTONS — solid olive primary
   -------------------------------------------------------------------------- */
.btn-primary,
.btn-secondary,
.btn,
button[type="submit"] {
  background: var(--text-primary);
  color: #fff !important;
  border: 1px solid var(--text-primary);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.08em;
  padding: 12px 26px;
  box-shadow: none;
}

.btn-primary:hover,
.btn-secondary:hover,
.btn:hover,
button[type="submit"]:hover {
  background: var(--olive);
  border-color: var(--olive);
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(92, 110, 53, 0.25);
  transform: translateY(-1px);
}

/* --------------------------------------------------------------------------
   8. SECTION HEADERS — editorial, understated
   -------------------------------------------------------------------------- */
.section-meta {
  margin-bottom: 16px;
}

.section-index {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
}

.section-line {
  background: var(--border-medium);
  width: 32px;
}

.section-category {
  color: var(--olive);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
}

.section-sep {
  margin-top: 100px;
  margin-bottom: 100px;
}

h2.display-lg {
  font-size: clamp(28px, 4.5vw, 44px);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: none;
  color: var(--text-primary);
  line-height: 1.15;
  margin-bottom: 20px;
}

/* --------------------------------------------------------------------------
   9. CARD SHEEN — remove the specular cursor effect
   -------------------------------------------------------------------------- */
.glass-panel::before,
.gallery-item::before,
.exp-card::before,
.contact-card::before,
.webdev-card::before {
  display: none !important;
}

/* Card base — white, clean border */
.glass-panel,
.gallery-item,
.exp-card,
.contact-card,
.webdev-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
}

/* --------------------------------------------------------------------------
   10. PROFILE / ABOUT — open, breathable
   -------------------------------------------------------------------------- */
.glass-panel {
  padding: 40px;
  box-shadow: var(--shadow-md);
}

.portrait-wrapper {
  background: var(--bg-card-elevated);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
}

.portrait-wrapper:hover img {
  transform: scale(1.02);
}

.portrait-credit {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--border-subtle);
  color: var(--text-muted);
}

.portrait-credit:hover {
  color: var(--olive);
}

.label-md {
  color: var(--olive);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.about-text p {
  color: var(--text-secondary) !important;
  font-size: 14.5px;
  line-height: 1.85;
}

.dossier-skills-matrix {
  border-top: 1px solid var(--border-subtle);
}

.skill-spec-item {
  background: var(--bg-card-elevated);
  border: 1px solid var(--border-subtle);
  border-left: 2px solid var(--olive);
  padding: 14px 18px;
}

.skill-spec-item:hover {
  background: var(--bg-card-hover);
  transform: translateY(-1px);
}

.skill-spec-label {
  color: var(--text-muted);
  font-size: 9px;
}

.skill-spec-value {
  color: var(--text-primary) !important;
  font-size: 13px;
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   11. EXPERIENCE CARDS — line accent, clean
   -------------------------------------------------------------------------- */
.exp-card {
  border-left: 2px solid var(--border-subtle);
  padding: 22px 28px;
  box-shadow: none;
  background: transparent;
  border-top: none;
  border-right: none;
  border-bottom: none;
}

.exp-card:hover,
.exp-card.active {
  border-left-color: var(--olive);
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
  transform: translateX(2px);
}

.exp-header h3 {
  color: var(--text-primary) !important;
  font-size: 17px;
  font-weight: 600;
}

.exp-card.active .exp-header h3,
.exp-card:hover .exp-header h3 {
  color: var(--olive) !important;
}

.exp-header .date {
  color: var(--text-muted);
  background: var(--bg-card-elevated);
  border: 1px solid var(--border-subtle);
  font-size: 10.5px;
}

.exp-info p {
  color: var(--text-secondary) !important;
  font-size: 13.5px;
}

/* --------------------------------------------------------------------------
   12. WEBDEV CARDS — compact 4-column layout
   -------------------------------------------------------------------------- */
.webdev-grid {
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

@media (max-width: 1100px) {
  .webdev-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .webdev-grid {
    grid-template-columns: 1fr;
  }
}

.webdev-lead {
  margin-bottom: 24px;
}

.webdev-card {
  box-shadow: var(--shadow-sm);
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
}

.webdev-card:hover {
  border-color: var(--olive);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.webdev-card-top {
  background: var(--bg-card-elevated);
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 9px;
  padding: 7px 12px;
}

.webdev-status-indicator {
  color: var(--olive);
  font-size: 9px;
}

.webdev-status-dot {
  width: 5px;
  height: 5px;
  background: var(--olive);
  box-shadow: none;
}

.webdev-art-wrapper {
  aspect-ratio: 1376 / 768;
  background: var(--bg-card-elevated);
}

.webdev-art-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.webdev-art-overlay {
  display: none;
}

.webdev-card:hover .webdev-art-img {
  transform: none;
}

.webdev-card-body {
  padding: 14px 16px 16px;
}

.webdev-card-cat {
  color: var(--text-muted);
  font-size: 9px;
  letter-spacing: 0.1em;
  margin-bottom: 4px;
}

.webdev-card-title {
  color: var(--text-primary) !important;
  font-size: 16px;
  font-weight: 700;
}

.webdev-card-sub {
  color: var(--olive);
  font-size: 11px;
  font-weight: 500;
  margin-top: 2px;
  margin-bottom: 8px;
}

.webdev-card-desc {
  color: var(--text-secondary);
  font-size: 11.5px;
  line-height: 1.6;
  margin-bottom: 12px;
  flex-grow: 1;
}

.webdev-tag {
  font-size: 9px;
  padding: 1px 6px;
  background: var(--bg-card-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
}

.webdev-tag-list {
  gap: 4px;
  margin-bottom: 14px;
}

.webdev-card-actions {
  border-top: 1px solid var(--border-subtle);
  padding-top: 12px;
}

.webdev-launch-btn {
  background: var(--text-primary) !important;
  color: #fff !important;
  border: 1px solid var(--text-primary) !important;
  font-size: 11px !important;
  padding: 8px 14px !important;
}

.webdev-launch-btn:hover {
  background: var(--olive) !important;
  border-color: var(--olive) !important;
  color: #fff !important;
}

.webdev-launch-btn svg {
  width: 12px;
  height: 12px;
}

/* --------------------------------------------------------------------------
   13. GALLERY / THEME CARDS — photography-forward
   -------------------------------------------------------------------------- */
.theme-cards-grid {
  gap: 20px;
}

.theme-card {
  box-shadow: var(--shadow-sm);
  background: var(--bg-card);
}

.theme-card:hover {
  transform: translateY(-4px);
  border-color: var(--olive);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.theme-card-img-wrap {
  aspect-ratio: 3 / 2;
  background: var(--bg-card-elevated);
}

.theme-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: brightness(0.95) contrast(1.02) saturate(0.95);
}

.theme-card:hover .theme-card-img-wrap img {
  filter: brightness(1) contrast(1.05) saturate(1);
  transform: none;
}

.theme-card-overlay {
  background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.35) 100%);
}

.theme-card:hover .theme-card-overlay {
  opacity: 0.3;
}

.theme-card-info {
  background: var(--bg-card);
  border-top: 1px solid var(--border-subtle);
  padding: 18px 20px;
}

.theme-card-tag {
  color: var(--text-muted);
  font-size: 10px;
}

.theme-card-name {
  color: var(--text-primary) !important;
  font-size: 1.2rem;
  font-weight: 700;
}

.theme-card:hover .theme-card-name {
  color: var(--olive) !important;
}

.theme-card-cta {
  color: var(--text-muted);
  font-size: 11px;
}

.theme-card:hover .theme-card-cta {
  color: var(--olive);
}

/* Gallery page items */
.gallery-item {
  box-shadow: var(--shadow-sm);
}

.gallery-item:hover {
  border-color: var(--olive);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.gallery-img-wrapper {
  aspect-ratio: 3 / 2;
  background: var(--bg-card-elevated);
}

.gallery-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.gallery-item:hover .gallery-img-wrapper img {
  transform: none;
}

.gallery-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border-subtle);
}

.gallery-title {
  color: var(--text-primary) !important;
}

.gallery-meta-tag {
  color: var(--text-muted);
}

.gallery-back-link {
  color: var(--olive);
  border: 1px solid var(--border-olive);
  background: rgba(92, 110, 53, 0.05);
}

.gallery-back-link:hover {
  background: var(--olive);
  color: #fff;
  border-color: var(--olive);
}

/* Chips */
.chip {
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
}

.chip:hover {
  background: var(--bg-card-elevated);
  color: var(--text-primary);
  border-color: var(--border-medium);
}

.chip.active {
  background: var(--olive);
  color: #fff;
  border-color: var(--olive);
  box-shadow: 0 2px 8px rgba(92, 110, 53, 0.25);
}

/* --------------------------------------------------------------------------
   14. CONTACT — split layout, warm tones
   -------------------------------------------------------------------------- */
.contact-card {
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.contact-visual {
  border-right: 1px solid var(--border-subtle);
}

.contact-visual::before {
  background: linear-gradient(
    to top,
    rgba(28, 28, 26, 0.92) 0%,
    rgba(28, 28, 26, 0.6) 60%,
    rgba(28, 28, 26, 0.25) 100%
  );
}

.visual-content h2 {
  color: #fff !important;
  font-size: 34px;
  font-weight: 700;
  text-transform: none;
}

.contact-lead {
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
}

.instagram-link {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.instagram-link:hover {
  background: var(--olive);
  border-color: var(--olive);
  color: #fff;
}

.contact-form-panel {
  padding: 40px;
  background: var(--bg-card);
}

.form-group label {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.form-group input,
.form-group textarea {
  background: var(--bg-card-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 12px 16px;
  font-size: 14px;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--olive);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(92, 110, 53, 0.08);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   15. FOOTER — minimal
   -------------------------------------------------------------------------- */
footer {
  background: var(--bg-card-elevated);
  border-top: 1px solid var(--border-subtle);
  padding: 28px 0 44px;
  margin-top: 80px;
}

.footer-text {
  color: var(--text-muted);
  font-size: 11px;
}

/* --------------------------------------------------------------------------
   16. BOTTOM TICKER — very quiet
   -------------------------------------------------------------------------- */
.bottom-system-ticker {
  background: var(--bg-card-elevated);
  border-top: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 9px;
}

.ticker-status-live {
  color: var(--olive);
}

.ticker-info-scroll {
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   17. LIGHTBOX — clean white
   -------------------------------------------------------------------------- */
.lightbox-overlay {
  background: rgba(247, 246, 243, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.lightbox-content {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
}

.lightbox-close {
  color: var(--text-primary);
}

.lightbox-close:hover {
  color: var(--olive);
}

.lb-nav {
  background: #fff;
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

.lb-nav:hover {
  background: var(--olive);
  color: #fff;
  border-color: var(--olive);
}

.cs-visual {
  background: var(--bg-card-elevated);
}

.lightbox-caption {
  background: var(--bg-card);
  border-top: 1px solid var(--border-subtle);
}

.lightbox-caption h3 {
  color: var(--text-primary) !important;
  font-size: 20px;
  text-transform: none;
}

.lightbox-caption p {
  color: var(--text-secondary);
}

.cs-label {
  color: var(--olive);
}

.cs-body {
  color: var(--text-secondary) !important;
}

/* --------------------------------------------------------------------------
   18. CREDIT DIALOG
   -------------------------------------------------------------------------- */
.glass-dialog {
  background: #fff;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
  color: var(--text-primary);
}

.glass-dialog::backdrop {
  background: rgba(247, 246, 243, 0.8);
  backdrop-filter: blur(8px);
}

.dialog-content h3 {
  color: var(--olive) !important;
}

/* --------------------------------------------------------------------------
   19. MOBILE NAV — clean bottom bar
   -------------------------------------------------------------------------- */
@media (max-width: 860px) {
  .top-nav {
    top: 0;
    background: rgba(255, 255, 255, 0.96);
  }

  .bottom-sheet {
    background: rgba(255, 255, 255, 0.96) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border-top: 1px solid var(--border-subtle) !important;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.06) !important;
  }

  .peek-item {
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 500;
  }

  .peek-item svg {
    stroke: var(--text-muted);
  }

  .peek-item.active,
  .peek-item.active-nav,
  .peek-item:hover {
    color: var(--olive);
  }

  .peek-item.active svg,
  .peek-item.active-nav svg,
  .peek-item:hover svg {
    stroke: var(--olive);
  }
}

/* --------------------------------------------------------------------------
   20. DARK THEME — inverted to rich charcoal
       (When user toggles to "dark", we go to a warm dark palette)
   -------------------------------------------------------------------------- */
[data-theme="dark"] {
  --bg-deep: #111210;
  --bg-surface: #18191a;
  --bg-card: #1e1f20;
  --bg-card-elevated: #252627;
  --bg-card-hover: #2d2e30;

  --text-primary: #e5e3de;
  --text-secondary: #9a9790;
  --text-muted: #6b6862;

  --olive: #7a8e4a;
  --olive-rgb: 122, 142, 74;
  --orange: #9a9790;
  --orange-rgb: 154, 151, 144;

  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-medium: rgba(255, 255, 255, 0.12);
  --border-olive: rgba(122, 142, 74, 0.3);
  --glass-bg: rgba(17, 18, 16, 0.92);

  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .top-hud-bar {
  background: rgba(17, 18, 16, 0.96);
}

[data-theme="dark"] .top-nav {
  background: rgba(17, 18, 16, 0.94);
}

[data-theme="dark"] .nav-logo {
  filter: brightness(0) invert(1);
  opacity: 0.85;
}

[data-theme="dark"] .hero-logo {
  filter: brightness(0) invert(1) !important;
  opacity: 0.85;
}

[data-theme="dark"] .hero-overlay {
  background: radial-gradient(
    ellipse at center,
    rgba(17, 18, 16, 0.75) 0%,
    rgba(17, 18, 16, 0.95) 80%
  ) !important;
}

[data-theme="dark"] .hero-subtitle {
  color: var(--text-primary) !important;
}

[data-theme="dark"] .hero-bio {
  color: var(--text-secondary) !important;
}

[data-theme="dark"] .hero-btn {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-medium);
  color: var(--text-primary) !important;
  box-shadow: none;
}

[data-theme="dark"] .hero-btn:hover {
  background: var(--olive);
  color: #fff !important;
  border-color: var(--olive);
}

[data-theme="dark"] .hero-btn-accent {
  background: var(--olive);
  border-color: var(--olive);
  color: #fff !important;
}

[data-theme="dark"] .btn-primary,
[data-theme="dark"] .btn-secondary,
[data-theme="dark"] .btn,
[data-theme="dark"] button[type="submit"] {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary) !important;
  border: 1px solid var(--border-medium);
}

[data-theme="dark"] .btn-primary:hover,
[data-theme="dark"] .btn-secondary:hover,
[data-theme="dark"] .btn:hover,
[data-theme="dark"] button[type="submit"]:hover {
  background: var(--olive);
  border-color: var(--olive);
  color: #fff !important;
}

[data-theme="dark"] h2.display-lg {
  color: var(--text-primary);
}

[data-theme="dark"] .exp-card {
  background: transparent;
}

[data-theme="dark"] .exp-card:hover,
[data-theme="dark"] .exp-card.active {
  background: var(--bg-card);
}

[data-theme="dark"] .webdev-card-top {
  background: rgba(17, 18, 16, 0.8);
}

[data-theme="dark"] .webdev-launch-btn {
  background: rgba(255, 255, 255, 0.06) !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border-medium) !important;
}

[data-theme="dark"] .webdev-launch-btn:hover {
  background: var(--olive) !important;
  border-color: var(--olive) !important;
  color: #fff !important;
}

[data-theme="dark"] .contact-form-panel {
  background: var(--bg-card);
}

[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group textarea {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--border-subtle);
  color: var(--text-primary);
}

[data-theme="dark"] .form-group input:focus,
[data-theme="dark"] .form-group textarea:focus {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--olive);
}

[data-theme="dark"] footer {
  background: var(--bg-surface);
}

[data-theme="dark"] .bottom-system-ticker {
  background: var(--bg-deep);
}

[data-theme="dark"] .lightbox-overlay {
  background: rgba(17, 18, 16, 0.96);
}

[data-theme="dark"] .lightbox-content {
  background: var(--bg-card);
  border-color: var(--border-subtle);
}

[data-theme="dark"] .lightbox-close {
  color: var(--text-primary);
}

[data-theme="dark"] .lb-nav {
  background: var(--bg-card);
  color: var(--text-primary);
  border-color: var(--border-subtle);
}

[data-theme="dark"] .lightbox-caption {
  background: var(--bg-surface);
}

[data-theme="dark"] .glass-dialog {
  background: var(--bg-card);
  border-color: var(--border-subtle);
}

[data-theme="dark"] .glass-dialog::backdrop {
  background: rgba(17, 18, 16, 0.85);
}

[data-theme="dark"] .portrait-credit {
  background: rgba(17, 18, 16, 0.9);
  color: var(--text-muted);
}

@media (max-width: 860px) {
  [data-theme="dark"] .bottom-sheet {
    background: rgba(17, 18, 16, 0.96) !important;
    border-top-color: var(--border-subtle) !important;
  }

  [data-theme="dark"] .peek-item {
    color: var(--text-muted);
  }
}

/* --------------------------------------------------------------------------
   21. REMOVE ORIGINAL LIGHT-THEME OVERRIDES
       The original style.css has [data-theme="light"] rules that conflict
       because our default IS light. We neutralize them.
   -------------------------------------------------------------------------- */
[data-theme="light"] .top-hud-bar,
[data-theme="light"] .top-nav,
[data-theme="light"] .hero-overlay,
[data-theme="light"] .hero-btn,
[data-theme="light"] .about-grid,
[data-theme="light"] .skill-spec-item,
[data-theme="light"] .exp-card,
[data-theme="light"] .webdev-card,
[data-theme="light"] .theme-card,
[data-theme="light"] .theme-card-info,
[data-theme="light"] .contact-card,
[data-theme="light"] .contact-form-panel,
[data-theme="light"] footer,
[data-theme="light"] .bottom-system-ticker,
[data-theme="light"] .lightbox-content,
[data-theme="light"] .lightbox-caption,
[data-theme="light"] .glass-dialog {
  /* Force our root vars to apply — the original [data-theme="light"] rules
     set explicit hex colors that override CSS vars. We reset them. */
}

/* Override the original's nav-logo invert for light mode */
[data-theme="light"] .nav-logo,
[data-theme="light"] .hero-logo {
  filter: brightness(0) !important;
}

/* Override original light-theme heading forced colors */
[data-theme="light"] h1,
[data-theme="light"] h2,
[data-theme="light"] h3,
[data-theme="light"] h4,
[data-theme="light"] h5,
[data-theme="light"] h6,
[data-theme="light"] h2.display-lg,
[data-theme="light"] .hero-subtitle,
[data-theme="light"] .exp-header h3,
[data-theme="light"] .skill-spec-value,
[data-theme="light"] .theme-card-name,
[data-theme="light"] .webdev-card-title,
[data-theme="light"] .lightbox-caption h3,
[data-theme="light"] .dialog-content h3 {
  color: var(--text-primary) !important;
}

[data-theme="light"] .dialog-content h3 {
  color: var(--olive) !important;
}

[data-theme="light"] .hero-bio,
[data-theme="light"] .about-text p,
[data-theme="light"] [data-i18n="profile_p1"],
[data-theme="light"] [data-i18n="profile_p2"],
[data-theme="light"] .webdev-lead,
[data-theme="light"] .webdev-card-desc,
[data-theme="light"] .exp-info p,
[data-theme="light"] .label-md {
  color: var(--text-secondary) !important;
}

[data-theme="light"] .section-category {
  color: var(--olive) !important;
}

[data-theme="light"] .section-index {
  color: var(--text-muted) !important;
}

[data-theme="light"] .section-line {
  background: var(--border-medium);
}

[data-theme="light"] .cinema-noise {
  display: none !important;
}

/* Ensure the default state (no data-theme attr) looks identical to light */
html:not([data-theme]) .nav-logo {
  filter: brightness(0);
  opacity: 0.85;
}
