/* ================================================
   VARIABLES & BASE
   ================================================ */
:root {
  --bg: #050505;
  --text: #d0d0d0;
  --green: #00aa00;
  --green-dim: #006600;
  --border: #003300;
  --glow: rgba(0,170,0,0.25);
  --card-bg: rgba(0,10,0,0.5);
}

[data-theme="light"] {
  --bg: #f8f8f8;
  --text: #222;
  --green: #006600;
  --green-dim: #004400;
  --border: #88cc88;
  --glow: rgba(0,100,0,0.15);
  --card-bg: rgba(240,255,240,0.6);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Roboto Mono', monospace;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  padding: 3rem 1rem;
  transition: background 0.4s, color 0.4s;
}

body.loaded .tagline::after {
  content: '|';
  animation: blink-cursor 1.1s step-end infinite;
}

@keyframes blink-cursor {
  50% { opacity: 0; }
}

/* Subtle terminal grid overlay */
.terminal-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: 
    linear-gradient(rgba(0,170,0,0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,170,0,0.015) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.4;
  z-index: -1;
}

/* Container */
.container {
  max-width: 520px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
}

/* Profile */
.avatar {
  width: 140px;
  height: 140px;
  border-radius: 6px;
  border: 2px solid var(--green);
  margin: 1.5rem 0 1rem;
  box-shadow: 0 0 20px var(--glow);
  image-rendering: crisp-edges;
  transition: transform 0.3s;
}

.avatar:hover {
  transform: scale(1.05);
}

h1 {
  font-family: 'VT323', monospace;
  font-size: 3.6rem;
  color: var(--green);
  margin-bottom: 0.4rem;
  text-shadow: 0 0 10px var(--glow);
  letter-spacing: 2px;
}

.tagline.typewriter {
  font-size: 1.35rem;
  color: var(--green);
  margin: 1rem 0 3rem;
  overflow: hidden;
  border-right: 0.12em solid var(--green);
  white-space: nowrap;
  animation: typing 5s steps(45) forwards, blink 0.9s step-end infinite;
}

@keyframes typing {
  from { width: 0 }
  to { width: 100% }
}

@keyframes blink {
  50% { border-color: transparent }
}

/* Social icons */
.social-icons {
  margin: 1.2rem 0 2.5rem;
  font-size: 1.6rem;
}

.social-icons a {
  color: var(--green-dim);
  margin: 0 1.2rem;
  transition: color 0.25s;
  text-decoration: none;
}

.social-icons a:hover {
  color: var(--green);
}

/* Links / Buttons */
.btn {
  display: block;
  background: var(--card-bg);
  color: var(--green);
  text-decoration: none;
  padding: 1.1rem 1.8rem;
  margin: 1rem 0;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 1.15rem;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background: var(--green);
  transition: width 0.35s ease;
}

.btn:hover::after {
  width: 100%;
}

.btn:hover {
  border-color: var(--green);
  box-shadow: 0 0 18px var(--glow);
  transform: translateY(-2px);
}

.premium {
  border-color: #664400;
  color: #ffcc00;
}

.premium:hover {
  border-color: #ffaa00;
  color: #ffff00;
}

/* Server status */
.server-btn .status {
  font-size: 0.9rem;
  margin-left: 12px;
  vertical-align: middle;
}

.status-online { color: var(--green); font-weight: bold; }
.status-offline { color: #880000; }

/* Stats & Preview & Discord sections */
.stats-section, .preview-section, .discord-embed {
  margin: 3.5rem 0;
  padding: 1.8rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  font-size: 0.95rem;
  color: var(--green-dim);
}

.stats-grid div {
  padding: 0.6rem;
  background: rgba(0,40,0,0.3);
  border: 1px dashed var(--border);
  border-radius: 4px;
}

.preview-img {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 4px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.6);
}

h3 {
  font-family: 'VT323', monospace;
  font-size: 1.8rem;
  color: var(--green);
  margin-bottom: 1rem;
  letter-spacing: 1px;
}

/* Footer & Theme toggle */
footer {
  margin-top: 5rem;
  font-size: 0.95rem;
  color: var(--green-dim);
  opacity: 0.9;
}

#theme-toggle {
  background: none;
  border: none;
  color: var(--green-dim);
  cursor: pointer;
  font-size: 1rem;
  margin-left: 8px;
}

#theme-toggle:hover {
  color: var(--green);
}

footer a {
  color: var(--green-dim);
  text-decoration: none;
}

footer a:hover {
  color: var(--green);
  text-decoration: underline;
}

.contact {
  margin-top: 0.6rem;
}

/* Light mode overrides */
[data-theme="light"] .terminal-overlay { opacity: 0.12; }
[data-theme="light"] h1, [data-theme="light"] h3 { text-shadow: none; }
[data-theme="light"] .stats-grid div { background: rgba(220,255,220,0.4); }

/* Responsive */
@media (max-width: 520px) {
  h1 { font-size: 3rem; }
  .avatar { width: 120px; height: 120px; }
  .social-icons a { margin: 0 0.9rem; font-size: 1.4rem; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}