@import url('https://fonts.googleapis.com/css2?family=Space+Mono:ital,wght@0,400;0,700;1,400&family=VT323&display=swap');

:root {
  --terminal-green: #00ff00;
  --terminal-green-dim: #00cc00;
  --terminal-gray: #a0a0a0;
  --terminal-bg: #050505;
  --terminal-border: #1a1a1a;
  --glow-green: 0 0 10px rgba(0, 255, 0, 0.3), 0 0 20px rgba(0, 255, 0, 0.1);
  --glow-white: 0 0 15px rgba(255, 255, 255, 0.2);
}

* {
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--terminal-bg);
  color: var(--terminal-gray);
  font-family: 'Space Mono', monospace;
  overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #0a0a0a;
}
::-webkit-scrollbar-thumb {
  background: #2a2a2a;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #3a3a3a;
}

/* Hide scrollbar utility */
.scrollbar-hide::-webkit-scrollbar {
  display: none;
}
.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* CRT Scanline Effect - Refined */
.scanlines {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0),
    rgba(255, 255, 255, 0) 50%,
    rgba(0, 0, 0, 0.15) 50%,
    rgba(0, 0, 0, 0.15)
  );
  background-size: 100% 3px;
  pointer-events: none;
  z-index: 100;
  opacity: 0.4;
}

/* CRT Flicker - Reduced for comfort */
.crt-flicker {
  animation: flicker 0.15s infinite;
  pointer-events: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(255, 255, 255, 0.01);
  z-index: 99;
  opacity: 0.05;
}

@keyframes flicker {
  0% { opacity: 0.01; }
  50% { opacity: 0.03; }
  100% { opacity: 0.01; }
}

/* Matrix Background Text */
.matrix-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
  opacity: 0.15;
}

.matrix-bg::before {
  content: 
    "WHALE_PROTOCOL_INITIALIZED          010101010101          WHALE_REMAINS_SILENT          "
    "010101010101          WHALE_REMAINS_SILENT          WHALE_PROTOCOL_INITIALIZED          "
    "WHALE_REMAINS_SILENT          WHALE_PROTOCOL_INITIALIZED          010101010101          "
    "WHALE_PROTOCOL_INITIALIZED          010101010101          WHALE_REMAINS_SILENT          "
    "010101010101          WHALE_REMAINS_SILENT          WHALE_PROTOCOL_INITIALIZED          "
    "WHALE_REMAINS_SILENT          WHALE_PROTOCOL_INITIALIZED          010101010101          "
    "WHALE_PROTOCOL_INITIALIZED          010101010101          WHALE_REMAINS_SILENT          "
    "010101010101          WHALE_REMAINS_SILENT          WHALE_PROTOCOL_INITIALIZED          "
    "WHALE_REMAINS_SILENT          WHALE_PROTOCOL_INITIALIZED          010101010101          "
    "WHALE_PROTOCOL_INITIALIZED          010101010101          WHALE_REMAINS_SILENT          "
    "010101010101          WHALE_REMAINS_SILENT          WHALE_PROTOCOL_INITIALIZED          "
    "WHALE_REMAINS_SILENT          WHALE_PROTOCOL_INITIALIZED          010101010101          "
    "WHALE_PROTOCOL_INITIALIZED          010101010101          WHALE_REMAINS_SILENT          "
    "010101010101          WHALE_REMAINS_SILENT          WHALE_PROTOCOL_INITIALIZED          "
    "WHALE_REMAINS_SILENT          WHALE_PROTOCOL_INITIALIZED          010101010101          "
    "WHALE_PROTOCOL_INITIALIZED          010101010101          WHALE_REMAINS_SILENT          "
    "010101010101          WHALE_REMAINS_SILENT          WHALE_PROTOCOL_INITIALIZED          "
    "WHALE_REMAINS_SILENT          WHALE_PROTOCOL_INITIALIZED          010101010101          "
    "WHALE_PROTOCOL_INITIALIZED          010101010101          WHALE_REMAINS_SILENT          "
    "010101010101          WHALE_REMAINS_SILENT          WHALE_PROTOCOL_INITIALIZED          "
    "WHALE_REMAINS_SILENT          WHALE_PROTOCOL_INITIALIZED          010101010101          "
    "WHALE_PROTOCOL_INITIALIZED          010101010101          WHALE_REMAINS_SILENT          "
    "010101010101          WHALE_REMAINS_SILENT          WHALE_PROTOCOL_INITIALIZED          "
    "WHALE_REMAINS_SILENT          WHALE_PROTOCOL_INITIALIZED          010101010101          "
    "WHALE_PROTOCOL_INITIALIZED          010101010101          WHALE_REMAINS_SILENT          "
    "010101010101          WHALE_REMAINS_SILENT          WHALE_PROTOCOL_INITIALIZED          "
    "WHALE_REMAINS_SILENT          WHALE_PROTOCOL_INITIALIZED          010101010101          "
    "WHALE_PROTOCOL_INITIALIZED          010101010101          WHALE_REMAINS_SILENT          "
    "010101010101          WHALE_REMAINS_SILENT          WHALE_PROTOCOL_INITIALIZED          "
    "WHALE_REMAINS_SILENT          WHALE_PROTOCOL_INITIALIZED          010101010101          "
    "WHALE_PROTOCOL_INITIALIZED          010101010101          WHALE_REMAINS_SILENT          "
    "010101010101          WHALE_REMAINS_SILENT          WHALE_PROTOCOL_INITIALIZED          "
    "WHALE_REMAINS_SILENT          WHALE_PROTOCOL_INITIALIZED          010101010101          "
    "WHALE_PROTOCOL_INITIALIZED          010101010101          WHALE_REMAINS_SILENT          "
    "010101010101          WHALE_REMAINS_SILENT          WHALE_PROTOCOL_INITIALIZED          "
    "WHALE_REMAINS_SILENT          WHALE_PROTOCOL_INITIALIZED          010101010101          "
    "WHALE_PROTOCOL_INITIALIZED          010101010101          WHALE_REMAINS_SILENT          "
    "010101010101          WHALE_REMAINS_SILENT          WHALE_PROTOCOL_INITIALIZED          "
    "WHALE_REMAINS_SILENT          WHALE_PROTOCOL_INITIALIZED          010101010101          "
    "WHALE_PROTOCOL_INITIALIZED          010101010101          WHALE_REMAINS_SILENT          "
    "010101010101          WHALE_REMAINS_SILENT          WHALE_PROTOCOL_INITIALIZED          "
    "WHALE_REMAINS_SILENT          WHALE_PROTOCOL_INITIALIZED          010101010101          "
    "WHALE_PROTOCOL_INITIALIZED          010101010101          WHALE_REMAINS_SILENT          "
    "010101010101          WHALE_REMAINS_SILENT          WHALE_PROTOCOL_INITIALIZED          "
    "WHALE_REMAINS_SILENT          WHALE_PROTOCOL_INITIALIZED          010101010101          "
    "WHALE_PROTOCOL_INITIALIZED          010101010101          WHALE_REMAINS_SILENT          "
    "010101010101          WHALE_REMAINS_SILENT          WHALE_PROTOCOL_INITIALIZED          "
    "WHALE_REMAINS_SILENT          WHALE_PROTOCOL_INITIALIZED          010101010101          "
    "WHALE_PROTOCOL_INITIALIZED          010101010101          WHALE_REMAINS_SILENT          "
    "010101010101          WHALE_REMAINS_SILENT          WHALE_PROTOCOL_INITIALIZED          ";
  position: absolute;
  top: 0;
  left: 0;
  width: 400%;
  height: 400%;
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  line-height: 3.5;
  letter-spacing: 2px;
  word-spacing: 40px;
  color: #00ff00;
  white-space: pre-wrap;
  word-break: break-all;
  transform: rotate(-15deg) translateX(-15%) translateY(-15%);
}

/* Vignette Effect */
.vignette {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(ellipse at center, transparent 60%, rgba(0, 0, 0, 0.4) 100%);
  pointer-events: none;
  z-index: 98;
}

/* Blinking Cursor */
.cursor::after {
  content: '█';
  animation: blink 1s step-end infinite;
  margin-left: 2px;
  color: var(--terminal-green);
}

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

/* Text Glow Effects */
.text-glow-green {
  text-shadow: var(--glow-green);
}

.text-glow-white {
  text-shadow: var(--glow-white);
}

/* Hero Title Animation */
.hero-title {
  animation: heroGlow 3s ease-in-out infinite alternate;
}

@keyframes heroGlow {
  0% {
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.2), 0 0 20px rgba(255, 255, 255, 0.1);
  }
  100% {
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3), 0 0 40px rgba(255, 255, 255, 0.15), 0 0 60px rgba(255, 255, 255, 0.05);
  }
}

/* Status Pulse */
.status-pulse {
  animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

/* Terminal Utility Classes */
.text-terminal-dim {
  color: #555;
}

.terminal-border {
  border: 1px solid var(--terminal-border);
}

/* Terminal Input */
.terminal-input {
  background: transparent;
  border: none;
  color: var(--terminal-gray);
  font-family: 'Space Mono', monospace;
  width: 100%;
  caret-color: var(--terminal-green);
}

.terminal-input:focus {
  outline: none;
}

.terminal-input::placeholder {
  color: #444;
}

/* Card Styles */
.terminal-card {
  background: rgba(10, 10, 10, 0.6);
  border: 1px solid #1f1f1f;
  transition: all 0.3s ease;
  backdrop-filter: blur(4px);
}

.terminal-card:hover {
  border-color: #2a2a2a;
  background: rgba(15, 15, 15, 0.8);
  box-shadow: 0 0 20px rgba(0, 255, 0, 0.03);
}

/* Social Card Hover */
.social-card {
  transition: all 0.3s ease;
}

.social-card:hover {
  border-color: #333;
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.social-card:hover .icon-box {
  border-color: var(--terminal-green);
  box-shadow: 0 0 10px rgba(0, 255, 0, 0.2);
}

/* Glitch Hover Effect */
.glitch-hover:hover {
  animation: glitch 0.3s cubic-bezier(.25, .46, .45, .94) both infinite;
  color: #fff;
}

@keyframes glitch {
  0% { transform: translate(0) }
  20% { transform: translate(-2px, 2px) }
  40% { transform: translate(-2px, -2px) }
  60% { transform: translate(2px, 2px) }
  80% { transform: translate(2px, -2px) }
  100% { transform: translate(0) }
}

/* Fade In Animation */
.fade-in {
  animation: fadeIn 0.3s ease-out forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile Menu */
.mobile-menu-btn {
  display: none;
  cursor: pointer;
  padding: 12px;
  transition: all 0.2s ease;
}

.mobile-menu-btn:hover {
  color: var(--terminal-green);
}

.mobile-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(5, 5, 5, 0.98);
  z-index: 200;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
}

.mobile-drawer.open {
  transform: translateX(0);
}

.mobile-drawer-close {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 12px;
  cursor: pointer;
  color: var(--terminal-gray);
  transition: color 0.2s ease;
}

.mobile-drawer-close:hover {
  color: #fff;
}

/* Header Styles */
.header-blur {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(5, 5, 5, 0.8);
}

/* Copy Button Feedback */
.copy-btn {
  transition: all 0.2s ease;
  cursor: pointer;
}

.copy-btn:hover {
  color: var(--terminal-green);
  text-shadow: var(--glow-green);
}

.copy-btn.copied {
  color: var(--terminal-green);
}

/* Status Indicator */
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--terminal-green);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(0, 255, 0, 0.4);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(0, 255, 0, 0);
  }
}

/* Terminal Window */
.terminal-window {
  background: #080808;
  border: 1px solid #1a1a1a;
  border-radius: 4px;
}

.terminal-window-header {
  background: rgba(20, 20, 20, 0.8);
  border-bottom: 1px solid #1a1a1a;
  padding: 8px 12px;
}

/* ASCII Art Container */
.ascii-art {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  line-height: 1.1;
  white-space: pre;
  color: rgba(0, 255, 0, 0.3);
  overflow: hidden;
}

/* Link Styles */
.terminal-link {
  color: var(--terminal-green);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all 0.2s ease;
}

.terminal-link:hover {
  border-bottom-color: var(--terminal-green);
  text-shadow: var(--glow-green);
}

/* Footer Links */
.footer-link {
  color: #666;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: var(--terminal-green);
}

/* Responsive Styles */
@media (max-width: 768px) {
  .mobile-menu-btn {
    display: block;
  }
  
  .scanlines {
    background-size: 100% 2px;
    opacity: 0.3;
  }
  
  .hero-title {
    font-size: 3.5rem !important;
  }
}

@media (max-width: 640px) {
  .hero-title {
    font-size: 2.5rem !important;
  }
}

/* Touch Device Optimizations */
@media (hover: none) {
  .social-card:hover {
    transform: none;
  }
  
  .glitch-hover:hover {
    animation: none;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .scanlines,
  .crt-flicker {
    display: none;
  }
  
  .hero-title {
    animation: none;
  }
  
  .status-dot {
    animation: none;
  }
  
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus States for Accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--terminal-green);
  outline-offset: 2px;
}

/* Selection */
::selection {
  background: rgba(0, 100, 0, 0.5);
  color: #fff;
}

/* Print Styles */
@media print {
  .scanlines,
  .crt-flicker,
  .vignette {
    display: none;
  }
}
