.hacker-mode-toggle {
  display: inline-flex;
  min-width: 44px;
  height: 44px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-left: auto;
  padding: 0 10px;
  border: 1px solid rgba(0, 255, 102, .24);
  border-radius: 12px;
  background: rgba(0, 255, 102, .045);
  color: #79ffa9;
  font: 700 .57rem/1 var(--mono);
  letter-spacing: .06em;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease, color .18s ease;
}

.hacker-mode-toggle svg {
  width: 17px;
  height: 17px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hacker-mode-toggle i { color: #63806d; font-style: normal; }
.hacker-mode-toggle:hover,
.hacker-mode-toggle:focus-visible { border-color: rgba(0, 255, 102, .72); background: rgba(0, 255, 102, .1); box-shadow: 0 0 22px rgba(0, 255, 102, .12); }
.hacker-mode-toggle[aria-pressed="true"] { border-color: #00ff66; background: rgba(0, 255, 102, .13); color: #d9ffe6; box-shadow: 0 0 0 1px rgba(0, 255, 102, .16), 0 0 24px rgba(0, 255, 102, .17); }
.hacker-mode-toggle[aria-pressed="true"] i { color: #00ff66; }
.hacker-mode-toggle + .sound-toggle { margin-left: 8px; }

html[data-palette="matrix"] {
  --palette-midnight: #050906;
  --palette-aqua: #00ff66;
  --palette-pink: #9dffbd;
  --bg: #010302;
  --bg2: #030704;
  --card: #050906;
  --gold: #00ff66;
  --gold2: #9dffbd;
  --neon-green: #00ff66;
  --neon-purple: #36c96d;
  --muted: #8aaa94;
  --text: #eaffef;
  --line: rgba(0, 255, 102, .18);
  --shadow: 0 24px 70px rgba(0, 0, 0, .72), 0 0 34px rgba(0, 255, 102, .03);
}

html[data-palette="matrix"] body {
  background:
    radial-gradient(circle at 14% 10%, rgba(0, 255, 102, .055), transparent 26rem),
    radial-gradient(circle at 88% 20%, rgba(0, 255, 102, .035), transparent 30rem),
    linear-gradient(180deg, #010302 0%, #020503 52%, #000 100%);
}

html[data-palette="matrix"] .palette-ambient {
  background:
    radial-gradient(circle at 18% 24%, rgba(0, 255, 102, .105), transparent 25%),
    radial-gradient(circle at 78% 18%, rgba(0, 255, 102, .055), transparent 22%),
    radial-gradient(circle at 72% 76%, rgba(0, 255, 102, .045), transparent 25%);
  opacity: .42;
}

html[data-palette="matrix"] ::selection { background: #00ff66; color: #001706; }
html[data-palette="matrix"] .site-nav { border-color: rgba(0, 255, 102, .23); background: rgba(1, 4, 2, .82); box-shadow: 0 18px 52px rgba(0, 0, 0, .62), inset 0 1px 0 rgba(0, 255, 102, .045); }
html[data-palette="matrix"] .palette-switcher { border-color: rgba(0, 255, 102, .16); background: rgba(0, 0, 0, .52); }
html[data-palette="matrix"] .nav-links a { color: #7f9a87; }
html[data-palette="matrix"] .nav-links a:hover,
html[data-palette="matrix"] .nav-links a.active { color: #00ff66; text-shadow: 0 0 12px rgba(0, 255, 102, .38); }
html[data-palette="matrix"] .nav-cta,
html[data-palette="matrix"] .command-trigger { border-color: rgba(0, 255, 102, .32); background: rgba(0, 255, 102, .065); color: #9dffbd !important; }

html[data-palette="matrix"] .hero::before,
html[data-palette="matrix"] .tools-section::before { background-image: linear-gradient(rgba(0, 255, 102, .03) 1px, transparent 1px), linear-gradient(90deg, rgba(0, 255, 102, .03) 1px, transparent 1px); }
html[data-palette="matrix"] .hero::after { background: radial-gradient(circle, rgba(0, 255, 102, .095), transparent 68%); }
html[data-palette="matrix"] .hero-title { color: #b1c9b8; }
html[data-palette="matrix"] .hero-copy { color: #8aaa94; }
html[data-palette="matrix"] .pill,
html[data-palette="matrix"] .btn { border-color: rgba(0, 255, 102, .2); background: rgba(4, 10, 6, .82); }
html[data-palette="matrix"] .btn-primary,
html[data-palette="matrix"] .cv-download { border-color: transparent; background: linear-gradient(120deg, #00ff66, #9dffbd); color: #001707; box-shadow: 0 14px 36px rgba(0, 255, 102, .14); }

html[data-palette="matrix"] .terminal { border-color: rgba(0, 255, 102, .3); background: rgba(0, 3, 1, .95); box-shadow: 0 30px 90px rgba(0, 0, 0, .7), inset 0 0 55px rgba(0, 255, 102, .025); }
html[data-palette="matrix"] .terminal-head { border-bottom-color: rgba(0, 255, 102, .16); }
html[data-palette="matrix"] .terminal-body,
html[data-palette="matrix"] .terminal-line { color: #7eea9f; }
html[data-palette="matrix"] .terminal-photo { border-color: #00ff66; box-shadow: 0 0 0 8px rgba(0, 255, 102, .045), 0 0 38px rgba(0, 255, 102, .15); }
html[data-palette="matrix"] .terminal-photo-ring { border-color: rgba(0, 255, 102, .35); }

html[data-palette="matrix"] .profile-section,
html[data-palette="matrix"] .career-section { background: linear-gradient(180deg, rgba(3, 8, 5, .96), rgba(0, 2, 1, .98)); border-color: rgba(0, 255, 102, .075); }
html[data-palette="matrix"] .profile-section::before { background: radial-gradient(circle at 10% 18%, rgba(0, 255, 102, .075), transparent 31%), radial-gradient(circle at 88% 78%, rgba(0, 255, 102, .04), transparent 34%); }
html[data-palette="matrix"] .profile-summary,
html[data-palette="matrix"] .competency-card,
html[data-palette="matrix"] .profile-fact,
html[data-palette="matrix"] .career-section .edu-card { border-color: rgba(0, 255, 102, .13); background: linear-gradient(145deg, rgba(5, 12, 7, .96), rgba(0, 3, 1, .98)); }
html[data-palette="matrix"] .competency-tags span,
html[data-palette="matrix"] .skill-tags span,
html[data-palette="matrix"] .project-meta span,
html[data-palette="matrix"] .hobby-tags span { border-color: rgba(0, 255, 102, .12); background: rgba(0, 5, 2, .72); color: #91b49b; }

html[data-palette="matrix"] .work-showcase,
html[data-palette="matrix"] .work-board { background: radial-gradient(circle at 8% 8%, rgba(0, 255, 102, .055), transparent 24rem), #000201; }
html[data-palette="matrix"] .work-category { --work-accent: #00ff66 !important; background: linear-gradient(155deg, rgba(5, 12, 7, .94), rgba(0, 3, 1, .97)); box-shadow: 0 20px 58px rgba(0, 0, 0, .48), inset 0 1px 0 rgba(0, 255, 102, .04); }
html[data-palette="matrix"] .work-tile,
html[data-palette="matrix"] .work-tile-static { border-color: rgba(0, 255, 102, .13); background: #040a06; }
html[data-palette="matrix"] .work-tile:hover,
html[data-palette="matrix"] .work-tile:focus-visible { border-color: rgba(0, 255, 102, .65); box-shadow: 0 14px 34px rgba(0, 255, 102, .1); }

html[data-palette="matrix"] .work-detail-dialog,
html[data-palette="matrix"] .command-dialog { border-color: rgba(0, 255, 102, .26); background: #020603; box-shadow: 0 35px 120px rgba(0, 0, 0, .82), 0 0 48px rgba(0, 255, 102, .055); }
html[data-palette="matrix"] .work-detail-copy,
html[data-palette="matrix"] .command-head,
html[data-palette="matrix"] .command-body { background-color: rgba(3, 9, 5, .97); }
html[data-palette="matrix"] .command-item { background: rgba(5, 13, 7, .82); }
html[data-palette="matrix"] .command-item:hover,
html[data-palette="matrix"] .command-item:focus-visible { border-color: rgba(0, 255, 102, .45); background: rgba(7, 18, 10, .96); }

html[data-palette="matrix"] .hobby-card { --hobby-accent: #00ff66; background: linear-gradient(145deg, rgba(5, 12, 7, .96), rgba(0, 3, 1, .99)); }
html[data-palette="matrix"] .fishing-profile { border-color: rgba(0, 255, 102, .18); background: linear-gradient(155deg, rgba(0, 255, 102, .055), rgba(0, 0, 0, .2)); }
html[data-palette="matrix"] .scroll-progress span { background: linear-gradient(90deg, #003d19, #00ff66, #9dffbd); box-shadow: 0 0 14px rgba(0, 255, 102, .45); }
html[data-palette="matrix"] a:focus-visible,
html[data-palette="matrix"] button:focus-visible,
html[data-palette="matrix"] input:focus-visible,
html[data-palette="matrix"] textarea:focus-visible { outline-color: #00ff66; }

html[data-hacker-mode="true"] body::after {
  content: '';
  position: fixed;
  z-index: 1900;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(180deg, transparent 0 3px, rgba(0, 255, 102, .028) 3px 4px);
  mix-blend-mode: screen;
}

html[data-hacker-mode="true"] .terminal-photo { opacity: 0; filter: blur(14px) brightness(.2); }
html[data-hacker-mode="true"] .terminal-photo-ring { z-index: 4; border-color: rgba(0, 255, 102, .58); box-shadow: inset 0 0 32px rgba(0, 255, 102, .055), 0 0 24px rgba(0, 255, 102, .08); }
html[data-hacker-mode="true"] .terminal-photo-ring::before { content: 'IDENTITY\A REDACTED'; position: absolute; inset: 0; display: grid; place-items: center; color: #00ff66; font: 700 .57rem/1.55 var(--mono); letter-spacing: .13em; text-align: center; white-space: pre; text-shadow: 0 0 12px rgba(0, 255, 102, .72); }
html[data-hacker-mode="true"] .terminal-signal-waves { position: absolute; z-index: 3; right: 24px; top: 82px; display: block; width: 142px; height: 142px; border-radius: 50%; pointer-events: none; }
html[data-hacker-mode="true"] .terminal-signal-waves i { position: absolute; inset: 0; border: 1px solid rgba(0, 255, 102, .72); border-radius: 50%; opacity: 0; box-shadow: 0 0 18px rgba(0, 255, 102, .16); animation: hacker-signal 2.8s ease-out infinite; }
html[data-hacker-mode="true"] .terminal-signal-waves i:nth-child(2) { animation-delay: .9s; }
html[data-hacker-mode="true"] .terminal-signal-waves i:nth-child(3) { animation-delay: 1.8s; }
@keyframes hacker-signal { 0% { opacity: 0; transform: scale(.82); } 16% { opacity: .72; } 100% { opacity: 0; transform: scale(1.75); } }

html[data-hacker-mode="true"] .terminal-body > .terminal-line { color: transparent; font-size: 0; }
html[data-hacker-mode="true"] .terminal-body > .terminal-line::after { color: #6dff9d; font: 500 .76rem/1.85 var(--mono); }
html[data-hacker-mode="true"] .terminal-body > .terminal-line:nth-child(2)::after { content: 'h_********_***** — identity protected'; }
html[data-hacker-mode="true"] .terminal-body > .terminal-line:nth-last-child(2)::after { content: '******** ******** ********'; }
html[data-hacker-mode="true"] .privacy-locked { cursor: not-allowed !important; user-select: none; }
html[data-hacker-mode="true"] .privacy-locked span,
html[data-hacker-mode="true"] .privacy-locked strong { color: #59d47f !important; font-family: var(--mono); letter-spacing: .06em; }
html[data-hacker-mode="true"] .cv-action.privacy-locked { border-color: rgba(0, 255, 102, .18); background: rgba(0, 255, 102, .035); color: #5d8168; box-shadow: none; }
html[data-hacker-mode="true"] .alperen-chat { display: none !important; }

@media (max-width: 900px) {
  .hacker-mode-toggle { width: 44px; padding: 0; }
  .hacker-mode-toggle span,
  .hacker-mode-toggle i { display: none; }
}

@media (max-width: 1100px) and (min-width: 901px) {
  html[data-hacker-mode="true"] .terminal-signal-waves { width: 125px; height: 125px; }
}

@media (max-width: 620px) {
  .hacker-mode-toggle { width: 38px; min-width: 38px; height: 40px; margin-left: auto; }
  .hacker-mode-toggle + .sound-toggle { margin-left: 5px; }
  html[data-hacker-mode="true"] .terminal-signal-waves { right: 50%; top: 61px; width: 110px; height: 110px; transform: translateX(50%); }
}

@media (max-width: 420px) {
  .site-nav .brand { display: none; }
  .palette-switcher { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .hacker-mode-toggle { transition: none; }
  html[data-hacker-mode="true"] .terminal-signal-waves i { animation: none; opacity: .38; transform: scale(1.18); }
}
