@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Inter:wght@400;500;600;700;800&family=Space+Mono:wght@400;700&display=swap');

:root {
  --bg: #0d1117;
  --bg-2: #111827;
  --surface: rgba(20, 27, 36, 0.82);
  --surface-strong: #182230;
  --surface-soft: rgba(255, 255, 255, 0.05);
  --text: #f8fafc;
  --muted: #a7b0bd;
  --dim: #697586;
  --line: rgba(255, 255, 255, 0.12);
  --yellow: #f4d35e;
  --cyan: #56cfe1;
  --green: #79e6a3;
  --red: #ff6b6b;
  --ink: #08111f;
  --sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --mono: "Space Mono", "SFMono-Regular", Consolas, monospace;
  --radius: 8px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 8%, rgba(86, 207, 225, 0.14), transparent 28rem),
    radial-gradient(circle at 84% 18%, rgba(244, 211, 94, 0.12), transparent 24rem),
    linear-gradient(135deg, #0d1117 0%, #121722 54%, #0b1018 100%);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.55;
  overflow-x: hidden;
}

body.auth-body,
body.dashboard-body {
  background:
    linear-gradient(rgba(13, 17, 23, 0.88), rgba(13, 17, 23, 0.96)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 90px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 90px),
    var(--bg);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

#signal-canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  opacity: 0.72;
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1rem clamp(1rem, 4vw, 3rem);
  background: rgba(13, 17, 23, 0.56);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(18px);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.topbar.scrolled,
.dash-topbar {
  background: rgba(13, 17, 23, 0.86);
  border-bottom-color: var(--line);
}

.brand,
.dash-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
}

.brand-mark {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--yellow);
  background: rgba(244, 211, 94, 0.08);
}

.topbar-links {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 2vw, 1.5rem);
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--muted);
}

.topbar-links a,
.dash-logout {
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.topbar-links a:hover,
.dash-logout:hover {
  color: var(--yellow);
}

main {
  width: min(1160px, calc(100% - 2rem));
  margin: 0 auto;
}

.hero-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.72fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  padding: 7rem 0 5rem;
}

.hero-copy h1 {
  max-width: 880px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(3.2rem, 7vw, 6.8rem);
  font-weight: 400;
  font-style: italic;
  letter-spacing: 0;
  line-height: 0.92;
}

.hero-name {
  margin: 0.5rem 0 0;
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3.5vw, 3.2rem);
  font-weight: 400;
  font-style: italic;
  color: var(--muted);
  line-height: 1;
}

.eyebrow {
  margin: 0 0 1rem;
  font-family: var(--mono);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--yellow);
}

.hero-text {
  max-width: 650px;
  margin: 2rem 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.8vw, 1.22rem);
}

.hero-actions,
.contact-actions,
.modal-actions,
.form-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.hero-actions {
  margin-top: 2rem;
}

.button,
.btn,
.dash-logout,
.icon-btn,
.contact-actions a {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.72rem 1rem;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
}

.button-primary,
.btn-primary {
  background: var(--yellow);
  border-color: var(--yellow);
  color: var(--ink);
  font-weight: 800;
}

.button-secondary,
.btn-ghost {
  color: var(--muted);
}

.button:hover,
.btn:hover,
.contact-actions a:hover {
  transform: translateY(-1px);
  border-color: rgba(244, 211, 94, 0.55);
}

.machine-panel,
.auth-card,
.dash-stat,
.website-card,
.modal,
.signal-board,
.build-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.machine-panel {
  position: relative;
  min-height: auto;
  padding: 1.5rem;
  overflow: hidden;
}

.machine-panel::before {
  content: "";
  position: absolute;
  inset: 1rem;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  pointer-events: none;
}

.panel-top {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.75rem;
}

.panel-pill {
  color: var(--green);
}

.fixed-blobys-overlay {
  position: fixed;
  bottom: 0;
  right: 0;
  width: 440px;
  max-width: 100vw;
  z-index: 100;
  pointer-events: none; /* Let clicks pass through empty areas */
}

.fixed-blobys-overlay .blobys-stage {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  pointer-events: none; /* Crucial: the massive SVG box shouldn't block clicks */
  will-change: transform;
}

.bloby, .bloby * {
  transform-box: fill-box;
  transform-origin: center bottom;
  pointer-events: auto; /* Ensure the paths inside catch the click */
  cursor: pointer;
}

.bloby-aura {
  animation: bloby-breathe 5.8s ease-in-out infinite;
}

.bloby-umbra {
  animation: bloby-heavy 7.2s ease-in-out infinite;
}

.bloby-nova {
  animation: bloby-bounce 4.6s ease-in-out infinite;
}

.bloby-flux {
  transform-origin: center center;
  animation: bloby-float 4s ease-in-out infinite;
}

.bloby-face path,
.bloby-shine,
.cable,
.antenna {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bloby-face path {
  stroke: #10131a;
  stroke-width: 5;
}

.bloby-face.tiny path {
  stroke: #fff;
  stroke-width: 4;
}

.bloby-face .brow {
  stroke-width: 7;
}

.bloby-shine {
  stroke: rgba(255, 255, 255, 0.34);
  stroke-width: 8;
}

.cable {
  stroke: rgba(86, 207, 225, 0.28);
  stroke-width: 3;
  stroke-dasharray: 10 12;
  animation: cable-flow 18s linear infinite;
}

.cable-two {
  stroke: rgba(244, 211, 94, 0.26);
  animation-duration: 13s;
}

.antenna {
  stroke: #79e6a3;
  stroke-width: 5;
}

.antenna-dot {
  fill: #79e6a3;
  filter: drop-shadow(0 0 12px rgba(121, 230, 163, 0.9));
}

.bloby-pupil {
  transition: transform 0.16s ease-out;
}

.bloby-label {
  fill: var(--dim);
  font-family: var(--mono);
  font-size: 15px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

@keyframes bloby-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.025, 0.985) translateY(3px); }
}

@keyframes bloby-heavy {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.018, 0.992) translateY(2px); }
}

@keyframes bloby-bounce {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  45% { transform: translateY(-8px) rotate(1.5deg); }
  70% { transform: translateY(2px) rotate(-0.8deg); }
}

@keyframes bloby-float {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-18px) rotate(4deg); }
}

@keyframes cable-flow {
  to { stroke-dashoffset: -120; }
}

.signal-list {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 0.75rem;
}

.signal-list div,
.model-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.78rem;
}

.status {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--dim);
}

.status.online { background: var(--green); box-shadow: 0 0 14px rgba(121, 230, 163, 0.7); }
.status.warm,
.status.wip { background: var(--yellow); box-shadow: 0 0 14px rgba(244, 211, 94, 0.7); }
.status.idle { background: var(--cyan); }
.status.offline { background: var(--dim); }

.ticker {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.ticker span {
  padding: 1rem;
  background: rgba(13, 17, 23, 0.8);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
  text-align: center;
}

.section {
  padding: clamp(4rem, 8vw, 7rem) 0;
}

.section-heading {
  max-width: 720px;
  margin-bottom: 2rem;
}

.section-heading h2,
.contact-section h2,
.auth-title,
.dash-greeting,
.modal-title {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.25rem, 4vw, 3.6rem);
  font-style: italic;
  font-weight: 400;
  line-height: 1;
}

.build-carousel-wrapper {
  width: 100%;
  overflow: hidden;
  padding: 1rem 0;
  mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
}

.build-carousel-track {
  display: flex;
  gap: 1.5rem;
  width: max-content;
  will-change: transform;
}

.build-carousel-track:hover .build-card:not(:hover) {
  opacity: 0.5;
  transform: scale(0.98);
}

.build-card {
  width: 320px;
  flex: 0 0 auto;
  min-height: 340px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.4s ease, border-color 0.2s ease;
}

.build-card.featured {
  width: 480px;
  background:
    linear-gradient(140deg, rgba(244, 211, 94, 0.18), rgba(86, 207, 225, 0.08)),
    var(--surface);
}

.build-card:hover {
  transform: translateY(-4px);
  border-color: rgba(244, 211, 94, 0.58);
}

.build-index,
.build-meta {
  font-family: var(--mono);
  color: var(--muted);
  font-size: 0.72rem;
}

.build-card h3 {
  margin: auto 0 0.75rem;
  font-size: clamp(1.5rem, 3vw, 2.7rem);
  line-height: 1;
}

.build-card p,
.signal-board p,
.about-copy p {
  color: var(--muted);
}

.signal-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  background: var(--line);
}

.signal-board div {
  padding: 1.5rem;
  background: rgba(13, 17, 23, 0.76);
}

.signal-board strong {
  color: var(--yellow);
  font-family: var(--mono);
}

.contact-section {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  align-items: end;
}

.contact-actions {
  justify-content: flex-end;
}

.footer {
  width: min(1160px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 3rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 0.75rem;
  border-top: 1px solid var(--line);
}

/* Auth */
.auth-main {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 2rem;
  align-items: center;
  padding: 6rem clamp(1rem, 4vw, 3rem) 3rem;
}

.auth-intro {
  max-width: 760px;
}

.auth-intro h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(4rem, 10vw, 8.5rem);
  font-style: italic;
  font-weight: 400;
  line-height: 0.82;
}

.auth-intro p {
  max-width: 560px;
  color: var(--muted);
  font-size: 1.1rem;
}

.auth-card {
  padding: 1.5rem;
}

.auth-title {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.auth-subtitle,
.auth-hint,
.form-help {
  color: var(--muted);
  margin: 0 0 1.5rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.form-input,
.form-select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  padding: 0.75rem 0.85rem;
  outline: none;
}

.form-input:focus,
.form-select:focus {
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px rgba(244, 211, 94, 0.12);
}

.form-select option {
  background: var(--surface-strong);
}

.input-wrap {
  position: relative;
}

.input-wrap .form-input {
  padding-right: 3rem;
}

.input-toggle {
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.form-meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin: 0.5rem 0 1.2rem;
  color: var(--muted);
  font-size: 0.84rem;
}

.checkbox-wrap {
  display: flex;
  gap: 0.45rem;
  align-items: center;
}

.auth-error {
  min-height: 1.25rem;
  margin-bottom: 1rem;
  color: var(--red);
  font-family: var(--mono);
  font-size: 0.78rem;
}

.otp-section[hidden],
.setup-fields[hidden],
.login-fields[hidden],
.form-meta[hidden],
.auth-hint[hidden] {
  display: none;
}

.pin-inputs {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.45rem;
  margin: 1rem 0;
}

.pin-box {
  width: 100%;
  height: 50px;
  text-align: center;
  font-family: var(--mono);
  font-weight: 700;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.auth-switch {
  margin-top: 1.25rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.auth-switch button {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--yellow);
  cursor: pointer;
}

/* Dashboard */
.dash-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem clamp(1rem, 4vw, 3rem);
}

.dashboard {
  padding: 7rem 0 4rem;
}

.dash-header {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: end;
  margin-bottom: 2rem;
}

.dash-greeting {
  font-size: clamp(3rem, 6vw, 5rem);
}

.dash-date {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.8rem;
}

.dash-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.dash-stat {
  padding: 1.25rem;
}

.dash-stat-value {
  font-size: 2.4rem;
  font-weight: 800;
}

.dash-stat-label,
.dash-section-title {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.dash-section-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
}

.websites-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.website-card {
  padding: 1.2rem;
  min-height: 210px;
  display: flex;
  flex-direction: column;
}

.website-card-top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
}

.website-card-actions {
  display: flex;
  gap: 0.4rem;
}

.website-card-name {
  margin: auto 0 0.35rem;
  font-size: 1.45rem;
}

.website-card-url {
  color: var(--yellow);
  font-family: var(--mono);
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}

.website-card-desc {
  color: var(--muted);
}

.empty-state {
  padding: 3rem 1rem;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(4, 8, 14, 0.72);
}

.modal-overlay.open {
  display: flex;
}

.modal {
  width: min(460px, 100%);
  padding: 1.5rem;
}

.modal-title {
  font-size: 2.6rem;
  margin-bottom: 1rem;
}

.modal-actions {
  justify-content: flex-end;
  margin-top: 1.5rem;
}

@media (max-width: 900px) {
  .hero-shell,
  .auth-main {
    grid-template-columns: 1fr;
  }

  .hero-shell {
    padding-top: 6rem;
  }

  .machine-panel {
    min-height: 460px;
  }

  .ticker,
  .build-grid,
  .signal-board,
  .dash-stats {
    grid-template-columns: 1fr 1fr;
  }

  .build-card.featured {
    grid-column: span 1;
  }

  .contact-section,
  .dash-header {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.75rem;
  }

  .topbar-links {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 0.2rem;
  }

  .hero-shell {
    padding-top: 8rem;
  }

  .hero-copy h1,
  .auth-intro h1 {
    font-size: clamp(2.5rem, 12vw, 4rem);
  }

  .hero-name {
    font-size: clamp(1.2rem, 5vw, 1.8rem);
  }

  .ticker,
  .build-grid,
  .signal-board,
  .dash-stats,
  .pin-inputs {
    grid-template-columns: 1fr;
  }

  .pin-inputs {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .footer {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }

  /* Disable parallax on mobile — causes jank */
  .parallax-layer {
    transform: none !important;
  }

  /* Ensure terminal fits mobile screens */
  .hacker-terminal {
    width: 100%;
    height: 50vh;
    max-width: 100%;
    border-radius: 0;
  }
}

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

/* Guestbook Layer */
#guestbook-layer {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none;
  z-index: 10;
}
.guestbook-dot {
  position: absolute;
  width: 6px;
  height: 6px;
  background: #ff7eb6;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  box-shadow: 0 0 10px #ff7eb6, 0 0 20px #ff7eb6;
  animation: pop-in 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
@keyframes pop-in {
  to { transform: translate(-50%, -50%) scale(1); }
}

/* Cute Button */
.cute-btn {
  background: #ffb7b2;
  border: 2px solid #ff9e99;
  color: #fff;
  font-family: var(--sans);
  font-weight: bold;
  font-size: 1rem;
  padding: 1rem 2rem;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(255, 183, 178, 0.4);
  transition: all 0.3s;
}
.cute-btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 25px rgba(255, 183, 178, 0.6);
  background: #ff9e99;
}

/* Horror Overlay */
.horror-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: #000;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.1s;
}
.horror-overlay.active {
  opacity: 1;
  pointer-events: auto;
  animation: screen-shake 0.2s infinite;
}
.glitch-text {
  font-family: var(--mono);
  color: #f00;
  font-size: 6rem;
  font-weight: 900;
  text-transform: uppercase;
  position: relative;
  animation: text-glitch 0.1s infinite;
  text-align: center;
}
.glitch-text::before, .glitch-text::after {
  content: attr(data-text);
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: #000;
}
.glitch-text::before {
  left: 4px;
  text-shadow: -2px 0 blue;
  animation: noise-anim-2 0.2s infinite linear alternate-reverse;
}
.glitch-text::after {
  left: -4px;
  text-shadow: -2px 0 red;
  animation: noise-anim 0.2s infinite linear alternate-reverse;
}
.glitch-subtext {
  color: #fff;
  font-family: var(--mono);
  font-size: 1.5rem;
  margin-top: 1rem;
  animation: flicker 0.1s infinite;
  text-align: center;
}
.horror-eyes {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  background-image: radial-gradient(circle at 40% 40%, rgba(255,0,0,0.8) 0%, transparent 5%),
                    radial-gradient(circle at 60% 40%, rgba(255,0,0,0.8) 0%, transparent 5%);
  opacity: 0;
  animation: eyes-flash 3s infinite;
  mix-blend-mode: screen;
}
@keyframes screen-shake {
  0% { transform: translate(2px, 1px) rotate(0deg); }
  10% { transform: translate(-1px, -2px) rotate(-1deg); }
  20% { transform: translate(-3px, 0px) rotate(1deg); }
  30% { transform: translate(0px, 2px) rotate(0deg); }
  40% { transform: translate(1px, -1px) rotate(1deg); }
  50% { transform: translate(-1px, 2px) rotate(-1deg); }
  60% { transform: translate(-3px, 1px) rotate(0deg); }
  70% { transform: translate(2px, 1px) rotate(-1deg); }
  80% { transform: translate(-1px, -1px) rotate(1deg); }
  90% { transform: translate(2px, 2px) rotate(0deg); }
  100% { transform: translate(1px, -2px) rotate(-1deg); }
}
@keyframes text-glitch {
  0% { transform: skewX(0deg); }
  20% { transform: skewX(-10deg); }
  40% { transform: skewX(10deg); }
  60% { transform: skewX(0deg); }
  80% { transform: skewX(20deg); }
  100% { transform: skewX(-5deg); }
}
@keyframes noise-anim {
  0% { clip-path: inset(10% 0 80% 0); }
  20% { clip-path: inset(80% 0 5% 0); }
  40% { clip-path: inset(40% 0 40% 0); }
  60% { clip-path: inset(20% 0 60% 0); }
  80% { clip-path: inset(60% 0 20% 0); }
  100% { clip-path: inset(10% 0 70% 0); }
}
@keyframes noise-anim-2 {
  0% { clip-path: inset(20% 0 60% 0); }
  20% { clip-path: inset(60% 0 20% 0); }
  40% { clip-path: inset(10% 0 80% 0); }
  60% { clip-path: inset(80% 0 5% 0); }
  80% { clip-path: inset(40% 0 40% 0); }
  100% { clip-path: inset(30% 0 50% 0); }
}
@keyframes flicker {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
@keyframes eyes-flash {
  0%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 0.8; transform: translate(-50%, -50%) scale(1.1); }
}

.horror-exit {
  margin-top: 4rem;
  background: transparent;
  border: 1px solid red;
  color: red;
  font-family: var(--mono);
  font-size: 1rem;
  padding: 1rem 2rem;
  cursor: pointer;
  z-index: 10;
  text-transform: uppercase;
  animation: flicker 2s infinite;
  transition: background 0.2s, color 0.2s;
}
.horror-exit:hover {
  background: red;
  color: black;
}

/* Hacker Terminal Overlay */
.hacker-terminal {
  position: fixed;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 800px;
  height: 60vh;
  background: rgba(10, 10, 15, 0.95);
  border: 1px solid rgba(86, 207, 225, 0.3);
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), 0 0 20px rgba(86, 207, 225, 0.1);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  transition: top 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  font-family: var(--mono);
  backdrop-filter: blur(10px);
}
.hacker-terminal.open {
  top: 0;
}
.terminal-header {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 1rem;
  background: rgba(86, 207, 225, 0.1);
  border-bottom: 1px solid rgba(86, 207, 225, 0.2);
  color: #56cfe1;
  font-size: 0.85rem;
}
.terminal-close {
  background: transparent;
  border: none;
  color: #56cfe1;
  cursor: pointer;
  font-family: var(--mono);
}
.terminal-close:hover {
  color: #fff;
}
.terminal-body {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
  color: #a0aab2;
  font-size: 0.9rem;
  line-height: 1.5;
}
.terminal-line {
  margin-bottom: 0.5rem;
}
.terminal-input-line {
  display: flex;
  padding: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.prompt {
  color: #79e6a3;
  margin-right: 0.5rem;
}
.terminal-input {
  flex: 1;
  background: transparent;
  border: none;
  color: #fff;
  font-family: var(--mono);
  font-size: 0.9rem;
  outline: none;
}

/* Matrix Canvas */
#matrix-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9998;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s;
}
#matrix-canvas.active {
  opacity: 1;
}

/* Konami Code Confetti */
@keyframes confetti-fall {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
  25% {
    transform: translateY(25vh) rotate(180deg) translateX(20px);
  }
  50% {
    transform: translateY(50vh) rotate(360deg) translateX(-15px);
  }
  75% {
    transform: translateY(75vh) rotate(540deg) translateX(10px);
    opacity: 0.8;
  }
  100% {
    transform: translateY(105vh) rotate(720deg) translateX(-5px);
    opacity: 0;
  }
}

/* Visitor Globe Widget */
.widget-globe {
  position: fixed;
  bottom: 4.5rem;
  left: 1.5rem;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}
#globe-canvas {
  border-radius: 50%;
  border: 1px solid rgba(86, 207, 225, 0.2);
  box-shadow: 0 0 15px rgba(86, 207, 225, 0.1);
  cursor: default;
}
.globe-info {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--dim);
  text-align: center;
}
.globe-info span {
  color: var(--cyan);
  font-weight: 700;
}

/* Magic 8-Ball Widget */
.widget-8ball {
  position: fixed;
  bottom: 4.5rem;
  right: 1.5rem;
  z-index: 50;
  cursor: pointer;
  transition: transform 0.3s;
}
.widget-8ball:hover {
  transform: scale(1.1);
}
.ball-outer {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #333, #0a0a0a 70%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.6), inset 0 -3px 8px rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
}
.ball-window {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: radial-gradient(circle, #1a1a4e, #0a0a2e);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(86, 207, 225, 0.3);
}
#ball-answer {
  font-family: var(--mono);
  font-size: 0.55rem;
  color: #56cfe1;
  text-align: center;
  line-height: 1.1;
  padding: 2px;
  transition: opacity 0.3s;
}
.ball-shake {
  animation: shake-ball 0.5s ease;
}
@keyframes shake-ball {
  0%, 100% { transform: scale(1.1) rotate(0deg); }
  25% { transform: scale(1.1) rotate(-15deg); }
  50% { transform: scale(1.1) rotate(15deg); }
  75% { transform: scale(1.1) rotate(-10deg); }
}

/* Slot Machine Widget */
.widget-slot {
  position: fixed;
  bottom: 4.5rem;
  right: 7rem;
  z-index: 50;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
  width: 160px;
}
.widget-slot:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}
.slot-header {
  background: rgba(244, 211, 94, 0.1);
  padding: 0.4rem 0.8rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--yellow);
  text-align: center;
  border-bottom: 1px solid var(--line);
}
.slot-display {
  padding: 0.6rem 0.8rem;
  font-family: var(--sans);
  font-size: 0.7rem;
  color: var(--text);
  text-align: center;
  min-height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.3;
}

/* Time Wasted Counter */
.time-wasted {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--dim);
}

/* Parallax Layer */
.parallax-layer {
  transition: transform 0.15s ease-out;
}

/* Responsive: hide widgets on small screens */
@media (max-width: 768px) {
  .widget-globe,
  .widget-8ball,
  .widget-slot {
    display: none;
  }

  /* Cute button should fit */
  .cute-btn {
    font-size: 0.85rem;
    padding: 0.8rem 1.5rem;
  }
}

/* Scroll Reveal Animations */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1),
              transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal .section-heading,
.reveal .signal-board > div,
.reveal .build-carousel-wrapper,
.reveal .contact-actions {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible .section-heading { transition-delay: 0.1s; opacity: 1; transform: translateY(0); }
.reveal.visible .build-carousel-wrapper { transition-delay: 0.3s; opacity: 1; transform: translateY(0); }
.reveal.visible .contact-actions { transition-delay: 0.3s; opacity: 1; transform: translateY(0); }
.reveal.visible .signal-board > div:nth-child(1) { transition-delay: 0.2s; opacity: 1; transform: translateY(0); }
.reveal.visible .signal-board > div:nth-child(2) { transition-delay: 0.35s; opacity: 1; transform: translateY(0); }
.reveal.visible .signal-board > div:nth-child(3) { transition-delay: 0.5s; opacity: 1; transform: translateY(0); }

/* Achievement Toast */
.toast-container {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 10001;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
}
.toast {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--yellow);
  border-radius: 8px;
  padding: 0.75rem 1.25rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text);
  box-shadow: 0 8px 30px rgba(0,0,0,0.4);
  backdrop-filter: blur(10px);
  animation: toast-in 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) forwards,
             toast-out 0.4s 3s ease-in forwards;
  pointer-events: auto;
}
.toast-icon {
  margin-right: 0.5rem;
}
@keyframes toast-in {
  from { opacity: 0; transform: translateX(100px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes toast-out {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(100px); }
}
