@import url('https://fonts.googleapis.com/css2?family=Lora&family=Montserrat:wght@400;700&display=swap');

:root{
  font-size: 16px;
  line-height: calc(16*1.4)px;
  font-weight: 400;
  color: #004000;
  --background-color: #e0ffe0;
  --primary-color: #e0ffe0;
  --secondary-color: rgba(0, 128, 0, 0.2);
  --tertiary-color: #2c3e50;
  --accent-color: rgb(80, 37, 233);
  --accompany-color: #ff6347;
  --contrast-color: #004000;
  --complement-color: rgb(88, 88, 88);
  --highlight-color: #ff8c00;
  --blue-accent: #00d4ff;
  color-scheme: light dark;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@media (prefers-color-scheme: dark) {
  :root{
    color: rgba(245, 245, 245, 0.87);
    background-color: #0a0a0a;
    --secondary-color: rgba(170, 170, 170, 0.281);
    --tertiary-color: #2c3e50;
    --accent-color: rgb(80, 37, 233);
    --primary-color: #0a0a0a;
    --accompany-color: rgb(248, 33, 33);
    --contrast-color: white;
    --complement-color: rgb(88, 88, 88);
    --highlight-color: coral;
    --blue-accent: #00d4ff;
  }
}

body {
  font-family: 'Courier New', monospace;
  margin: 0;
  padding: 2px;
  display: flex;
  flex-direction: column;
  min-width: 320px;
  min-height: 100svh;
  cursor: url(https://cur.cursors-4u.net/cursors/cur-2/cur116.cur), auto !important;
  overflow-x: hidden;
  position: relative;
}

/* CRT Scanline Effect */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    transparent 50%, 
    rgba(0, 0, 0, 0.05) 50%
  );
  background-size: 100% 4px;
  pointer-events: none;
  z-index: 9999;
  animation: scanline 8s linear infinite;
}

@keyframes scanline {
  0% { transform: translateY(0); }
  100% { transform: translateY(4px); }
}

/* CRT Flicker Effect */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.01);
  pointer-events: none;
  z-index: 9998;
  animation: flicker 0.15s infinite;
}

@keyframes flicker {
  0% { opacity: 0.27861; }
  5% { opacity: 0.34769; }
  10% { opacity: 0.23604; }
  15% { opacity: 0.90626; }
  20% { opacity: 0.18128; }
  25% { opacity: 0.83891; }
  30% { opacity: 0.65583; }
  35% { opacity: 0.67807; }
  40% { opacity: 0.26559; }
  45% { opacity: 0.84693; }
  50% { opacity: 0.96019; }
  55% { opacity: 0.08594; }
  60% { opacity: 0.20313; }
  65% { opacity: 0.71988; }
  70% { opacity: 0.53455; }
  75% { opacity: 0.37288; }
  80% { opacity: 0.71428; }
  85% { opacity: 0.70419; }
  90% { opacity: 0.7003; }
  95% { opacity: 0.36108; }
  100% { opacity: 0.24387; }
}

* {
  box-sizing: border-box;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', serif;
}

a{
  color: var(--highlight-color);
  font-weight: 600;
  text-shadow: 0 0 8px var(--highlight-color);
  text-decoration: none;
  cursor: url(https://cur.cursors-4u.net/cursors/cur-2/cur106.cur), pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--highlight-color);
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

a:hover::after {
  width: 100%;
}

a:hover {
  color: var(--blue-accent);
  text-shadow: 0 0 12px var(--blue-accent);
}

input, textarea, button {
  background-color: rgba(0, 0, 0, 0.6);
  border: 2px solid var(--highlight-color);
  color: var(--highlight-color);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--blue-accent);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
  background-color: rgba(0, 0, 0, 0.8);
}

button {
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: var(--highlight-color);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1), height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

button:hover::before {
  width: 300px;
  height: 300px;
}

button:hover {
  background-color: transparent;
  color: #000;
  border-color: var(--highlight-color);
  box-shadow: 0 0 20px var(--highlight-color);
}

button span {
  position: relative;
  z-index: 1;
}

/* Enhanced Cursor Trail */
.cursor-trail {
  position: absolute;
  width: 15px;
  height: 15px;
  background: radial-gradient(circle, var(--highlight-color), transparent);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0.6;
  animation: cursorFade 0.8s ease-out forwards;
}

@keyframes cursorFade {
  to {
    opacity: 0;
    transform: scale(2);
  }
}

.particle {
  position: absolute;
  width: 60px;
  height: 60px;
  background: radial-gradient(circle, var(--highlight-color), transparent);
  border-radius: 50%;
  pointer-events: none;
  filter: blur(25px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  animation: particleFloat 1s ease-out forwards;
}

@keyframes particleFloat {
  to {
    opacity: 0;
    transform: translateY(-30px) scale(1.5);
  }
}

.console-text, .project-details p, .project-details h2{
  font-family: 'Courier New', monospace;
  text-shadow: 0 0 8px var(--highlight-color);
  display: inline-block;
}

.console-text{
  padding: 10px;
  border-radius: 5px;
}

/* Click Ripple Effect */
.click-ripple {
  position: absolute;
  border: 2px solid var(--highlight-color);
  border-radius: 50%;
  pointer-events: none;
  animation: rippleExpand 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes rippleExpand {
  from {
    width: 0;
    height: 0;
    opacity: 1;
  }
  to {
    width: 100px;
    height: 100px;
    opacity: 0;
  }
}

/* Background Code Rain (subtle) */
.code-rain {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.code-char {
  position: absolute;
  color: var(--highlight-color);
  font-family: 'Courier New', monospace;
  font-size: 14px;
  opacity: 0.1;
  animation: fall linear infinite;
}

@keyframes fall {
  to {
    transform: translateY(100vh);
    opacity: 0;
  }
}

@media screen and (max-width:800px) {
  body{
    padding: 0;
  }
  
  body::before {
    background-size: 100% 3px;
  }
}