:root {
  --primary: #00ff88;
  --secondary: #00ccff;
  --background: #0a0a0a;
  --terminal-bg: rgba(15, 15, 15, 0.95);
  --glow: rgba(0, 255, 136, 0.1);
  --font-family: 'Space Mono', monospace;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--font-family);
}

body {
  background: var(--background);
  color: var(--primary);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

.loader-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: var(--background);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  transition: opacity 1.2s ease-out, transform 1.5s ease-in-out, filter 1.2s ease-out;
}

.terminal-loader {
  color: var(--primary);
  font-size: 1.5rem;
  position: relative;
  padding-right: 15px;
}

.loader-cursor,
.cursor {
  width: 10px;
  height: 1.2em;
  background: var(--primary);
  position: absolute;
  animation: blink 1.5s step-end infinite;
}

.loader-cursor {
  right: -15px;
  bottom: 2px;
}

.binary-rain {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.25;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
  display: none;
  opacity: 0;
  animation: contentFadeIn 1.2s ease-out forwards;
}


.terminal-effect {
  border: 1px solid var(--primary);
  border-radius: 8px;
  box-shadow: 0 0 30px var(--glow);
  padding: 2rem;
  margin: 2rem 0;
  background: var(--terminal-bg);
  position: relative;
  overflow: hidden;
  word-break: keep-all;
  cursor: default;
  transition: all 0.3s ease;
}

.terminal-effect::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 255, 136, 0.1), transparent);
  animation: scan 6s infinite;
}

.window-controls {
  position: absolute;
  top: 15px;
  left: 15px;
  display: flex;
  gap: 8px;
}

.window-btn {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.window-btn:hover {
  transform: scale(1.15);
}

.window-btn:active {
  transform: scale(0.9);
}

.window-btn.active {
  filter: brightness(1.5);
}

/* Colores de botones */
.close { background: #ff5f56; }
.minimize { background: #ffbd2e; }
.maximize { background: #27c93f; }

.header {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2rem;
  align-items: center;
  margin-bottom: 3rem;
}

.profile-img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 3px solid var(--primary);
  object-fit: cover;
  box-shadow: 0 0 20px var(--glow);
  transition: transform 0.3s ease;
}

.profile-img:hover {
  transform: rotate(5deg) scale(1.05);
}

h1, h2 {
  color: var(--primary);
  margin-bottom: 1.5rem;
  position: relative;
}

h1 {
  text-align: center;
  font-size: 2.5rem;
  text-shadow: 0 0 10px var(--glow);
}

h2::before {
  content: '> ';
  color: var(--secondary);
}

ul {
  list-style: none;
  padding-left: 1.5rem;
}

li {
  margin: 1.5rem 0;
  position: relative;
  font-size: 1rem;
}

li::before {
  content: '$ ';
  color: var(--secondary);
  position: absolute;
  left: -1.5rem;
}

.subtext {
  font-size: 0.9em;
  color: var(--secondary);
  margin-top: 0.5rem;
  display: block;
  line-height: 1.4;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.contact-card {
  padding: 1rem;
  border: 1px solid var(--primary);
  border-radius: 4px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

a {
  color: var(--primary);
  text-decoration: none;
  position: relative;
}

a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--primary);
  transition: width 0.3s ease;
}

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

@keyframes scan {
  from { left: -100%; }
  to { left: 100%; }
}

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

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

@media (max-width: 768px) {
  .header {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .profile-img {
    width: 120px;
    height: 120px;
    margin: 0 auto;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  li {
    font-size: 0.95rem;
  }

  .terminal-effect {
    margin: 1rem 0;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 1rem;
  }

  .terminal-effect {
    padding: 1.5rem;
  }

  h1 {
    font-size: 1.8rem;
  }
}
